1.链接地址: http://poj.org/problem?id=1503 2.题目: Integer Inquiry Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 28115 Accepted: 10925 Description One of the first users of BIT's new supercomputer was Chip Diller. He extended his explorati…
一.Description One of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and he explored taking various sums of those numbers. ``This supercomputer is great,'' remarked Chip. ``I…
Description One of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and he explored taking various sums of those numbers. This supercomputer is great,'' remarked Chip.I only wi…
代码: import java.math.*; import java.util.Scanner; public class Main { public static void main(String args[]){ Scanner cin = new Scanner(System.in); BigInteger sum,a; sum = BigInteger.valueOf(0); while(true){ a = cin.nextBigInteger(); if(a.equals(BigI…
把输入的数加起来,输入0表示结束. 先看我Java代码,用BigINteger类很多东西都不需要考虑,比如前导0什么的,很方便.不过java效率低点,平均用时600ms,C/C++可以0ms过. import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in)…