Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**********************************************************************************/
- /* Problem: d392 "读取练习——强大的加法!" from liouzhou_101 */
- /* Language: JAVA (589 Bytes) */
- /* Result: AC(308ms, 12.1MB) judge by this@ZeroJudge */
- /* Author: ssc24 at 2011-09-24 15:01:45 */
- /**********************************************************************************/
- package javaapplication42;
- import java.util.*;
- import java.math.*;
- public class JavaApplication42 {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- while (sc.hasNext()){
- String input = sc.nextLine();
- StringTokenizer st = new StringTokenizer(input);
- long sum=0;
- //long temp=0;
- while(st.hasMoreTokens()){
- //temp =
- sum += Long.parseLong(st.nextToken());
- }
- System.out.println(sum);
- }//whlle*/
- }//main
- }//class
Add Comment
Please, Sign In to add comment