結果
問題 |
No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
|
ユーザー |
![]() |
提出日時 | 2017-06-02 13:26:38 |
言語 | Java (openjdk 23) |
結果 |
RE
|
実行時間 | - |
コード長 | 330 bytes |
コンパイル時間 | 5,883 ms |
コンパイル使用メモリ | 74,488 KB |
実行使用メモリ | 61,328 KB |
最終ジャッジ日時 | 2024-12-25 16:09:47 |
合計ジャッジ時間 | 15,743 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 RE * 1 |
other | AC * 8 RE * 7 |
ソースコード
import java.util.Scanner; public class Nsum { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); long x[] = new long[a]; long sum = 0; for (int i = 0 ; i < a ; i++){ x[i] = sc.nextInt(); sum += x[i]; } System.out.println(sum); } }