LanQiaoTestCodes/星期计算.java

20 lines
373 B
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package LanQiaoOJ;
/*
* 问题描述
本题为填空题,只需要算出结果后,在代码中使用输
出语句将所填结果输出即可。
已知今天是星期六请问20^22天后是星期几
注意用数字1到7表示星期一到星期日。*/
public class 星期计算 {
public static void main(String[] args) {
int ans=1;
for(int i=0;i<22;i++) {
ans*=20;
ans%=7;
}
System.out.print(ans+6);
}
}