原题链接:
数字整除
解题思路:我是懒人,直接Java大数,题目给的信息也没用上
注意事项:
参考代码:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
package
cWeb.buleCup;
import
java.math.BigInteger;
import
java.util.Scanner;
public
class
C1074 {
public
static
void
main(String[] args) {
// TODO Auto-generated method stub
Scanner in =
new
Scanner(System.in);
while
(in.hasNext()) {
String num = in.next();
if
(num.equals(
"0"
)) {
break
;
}
BigInteger bigInteger =
new
BigInteger(num);
if
(BigInteger.valueOf(
0
)==bigInteger.mod(
new
BigInteger(
"17"
))) {
System.out.println(
"1"
);
}
else
{
System.out.println(
"0"
);
}
}
}
}
|