Basic remains

http://poj.org/problem?id=2305

//package poj2305;
import java.io.*;
import java.math.*;
import java.util.*;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner cin = new Scanner( new BufferedInputStream( System.in ) );
		BigInteger p, m, ans;
		String str;
		int b;
		while( cin.hasNext() ){
			b = cin.nextInt();
			if( b == 0 )
				break;
			p = cin.nextBigInteger( b );
			m = cin.nextBigInteger( b );
			ans = p.mod( m );
			str = ans.toString( b );
			System.out.println( str );
		}
	}
}


Basic remains

上一篇:ENode 1.0 - 整体架构介绍


下一篇:02 Unity3d脚本功能--《程序员学Unity3d》