結果
問題 |
No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
|
ユーザー |
|
提出日時 | 2017-05-23 19:04:12 |
言語 | Java (openjdk 23) |
結果 |
RE
|
実行時間 | - |
コード長 | 370 bytes |
コンパイル時間 | 3,172 ms |
コンパイル使用メモリ | 73,944 KB |
実行使用メモリ | 59,452 KB |
最終ジャッジ日時 | 2024-09-19 11:46:22 |
合計ジャッジ時間 | 11,822 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 RE * 1 |
other | AC * 9 RE * 6 |
ソースコード
import java.util.Scanner; public class No9008 { public static void main(String[] args) { int n; Scanner sc = new Scanner(System.in); n = sc.nextInt(); int[] l = new int[n]; long sum = 0; for (int i = 0; i < n; i++) { l[i] = sc.nextInt(); } for (int i = 0; i < n; i++) { sum += l[i]; } System.out.println(sum); } }