結果
問題 |
No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
|
ユーザー |
|
提出日時 | 2018-04-08 14:33:10 |
言語 | Java (openjdk 23) |
結果 |
RE
|
実行時間 | - |
コード長 | 506 bytes |
コンパイル時間 | 2,027 ms |
コンパイル使用メモリ | 75,956 KB |
実行使用メモリ | 75,568 KB |
最終ジャッジ日時 | 2024-06-26 20:20:21 |
合計ジャッジ時間 | 12,523 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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]=scan.nextLong(); } //合計計算 long sum=0; for(int i=0;i<a.length;i++){ sum+=a[i]; } System.out.println(sum); } }