poj 2305 Basic remains java
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner cin= new Scanner(System.in);
int b=0;
while(cin.hasNextInt())
{
b=cin.nextInt();
if(b==0) break;
BigInteger p=cin.nextBigInteger(b);
BigInteger m=cin.nextBigInteger(b);
BigInteger ans=p.mod(m);
String st=ans.toString(b);
System.out.println(st);
}
}
}
版权声明:本文为博主原创文章,未经博主允许不得转载。http://xiang578.top/