Khorasho


私信TA

用户名:Khorasho

访问量:2842

签 名:

Khorasho

等  级
排  名 4869
经  验 1567
参赛次数 9
文章发表 6
年  龄 0
在职情况 学生
学  校 黑龙江工商学院
专  业

  自我简介:

TA的其他文章

解题思路: 直接用BigInteger



注意事项:

参考代码:

import java.math.BigInteger;
import java.util.Scanner;

public class C1074 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		BigInteger a = new BigInteger("0");
		while(sc.hasNext()) {
			BigInteger n = sc.nextBigInteger();
			if(n.compareTo(a)==0) {
				continue;
			}
			if(n.mod(new BigInteger("17")).compareTo(a)==0) {
				System.out.println(1);
			}else
				System.out.println(0);
		}		
	}
}


 

0.0分

0 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区

用 sc.nextLong();能做不,我用eclipse运行正常,但是上传代码时显示错误。求解答
2018-10-27 22:21:04
  • «
  • 1
  • »