Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scan = new Scanner(new BufferedReader(new FileReader("input.txt")));
- int n = scan.nextInt();
- for (int i = 0; i < n; i++) {
- while (scan.hasNextLine()) {
- sum += scan.nextInt();
- }
- System.out.println(sum);
- sum = 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement