HDOJ 2162 Add ‘em(水题)
2018-04-09 15:57
357 查看
HDACM 2162
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int count = 1; while(sc.hasNext()){ int n = sc.nextInt(); if (n<=0) { break; } int sum = 0; while(n-->0){ sum += sc.nextInt(); } System.out.println("Sum of #"+count+++" is "+sum); } sc.close(); } }
相关文章推荐
- HDOJ(HDU) 2162 Add ‘em(求和)
- Add ‘em hdoj2162
- HDOJ(HDU) 2162 Add ‘em(求和)
- Add ‘em 2162
- hdu 2162 Add ‘em
- hdu 2162 Add ‘em
- hdu-2162-Add ‘em
- JAVA hdu 2162 Add ‘em
- 杭电acm 2162 Add ‘em
- hdoj2044 一只小蜜蜂 以及如何让水题不水
- HDOJ 5804 Price List (水题)
- HDOJ 1196 Lowest Bit(水题)
- hdoj--幸福指数(水题)
- 水题hdoj-2005 scanf用好了事半功倍
- HDOJ 1096 A+B for Input-Output Practice (VIII)(水题)
- HDOJ 1008 Elevator(水题)
- HDOJ 1994 利息计算(水题)
- HDOJ2003 ( 求绝对值 ) 【水题】
- hdoj--5479--Scaena Felix(stack水题)
- HDOJ2015 ( 偶数求和 ) 【水题】