import java.io.*;
import java.math.*;
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner cin = new Scanner(new BufferedInputStream(System.in));
int b;
BigInteger p,m;
while(cin.hasNext()){
b = cin.nextInt();
if(b==0)break;
p = cin.nextBigInteger(b);
m = cin.nextBigInteger(b);
p = p.mod(m);
//System.out.println("!"+1100%101);
String ans = p.toString(b);
System.out.println(ans);
}
}
}
【Java练习6】POJ 2305
最新推荐文章于 2024-08-30 18:40:43 发布