結果
問題 |
No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
|
ユーザー |
|
提出日時 | 2018-04-08 14:34:56 |
言語 | Java (openjdk 23) |
結果 |
RE
|
実行時間 | - |
コード長 | 518 bytes |
コンパイル時間 | 2,176 ms |
コンパイル使用メモリ | 75,524 KB |
実行使用メモリ | 58,916 KB |
最終ジャッジ日時 | 2024-06-26 20:20:33 |
合計ジャッジ時間 | 10,577 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 4 |
other | RE * 15 |
ソースコード
import java.io.*; import java.util.*; class Main{ public static void main(String[] args)throws IOException { //入力 BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); Scanner scan=new Scanner(System.in); int n=Integer.parseInt(br.readLine()); long[] a=new long[n]; for(int i=0;i<a.length;i++){ a[i]=Long.parseLong(scan.next()); } //合計計算 long sum=0; for(int i=0;i<a.length;i++){ sum+=a[i]; } System.out.println(sum); } }