結果
問題 |
No.369 足し間違い
|
ユーザー |
![]() |
提出日時 | 2018-05-03 22:33:19 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 269 ms / 2,000 ms |
コード長 | 385 bytes |
コンパイル時間 | 3,696 ms |
コンパイル使用メモリ | 74,296 KB |
実行使用メモリ | 46,888 KB |
最終ジャッジ日時 | 2024-06-28 00:52:45 |
合計ジャッジ時間 | 4,126 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int []A = new int[N]; for(int i = 0; i < N; i++) { A[i] = scan.nextInt(); } int v = scan.nextInt(); scan.close(); int sum = 0; for(int i = 0; i < N; i++) { sum += A[i]; } System.out.println(sum - v); } }