问题描述
本题为填空题,只需要算出结果后,在代码中使用输出语句将所填结果输出即可。
已知今天是星期六,请问 20^{22}2022 天后是星期几?
注意用数字 11 到 77 表示星期一到星期日
import java.math.BigInteger;
import java.util.Scanner;
public class d {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
BigInteger a1=BigInteger.ONE;
for(int i=0;i<22;i++) {
a1=a1.multiply(new BigInteger("20"));
}
BigInteger yushu=BigInteger.ONE;
BigInteger a=a1.add(new BigInteger("5"));
yushu=a.modPow(a, new BigInteger("7"));
BigInteger end=yushu.add(new BigInteger("1"));
System.out.println(end);
}
}