結果
問題 |
No.369 足し間違い
|
ユーザー |
![]() |
提出日時 | 2017-05-03 21:58:52 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 101 ms / 2,000 ms |
コード長 | 645 bytes |
コンパイル時間 | 2,152 ms |
コンパイル使用メモリ | 75,960 KB |
実行使用メモリ | 39,336 KB |
最終ジャッジ日時 | 2024-09-14 07:10:53 |
合計ジャッジ時間 | 3,392 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.stream.Stream; import static java.lang.System.in; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(in)); int N = Integer.parseInt(reader.readLine()); String[] inputs = reader.readLine().split(" "); long sum = 0; for (int i = 0; i < N; i++) { sum += Long.parseLong(inputs[i]); } long v = Long.parseLong(reader.readLine()); System.out.println(sum-v); } }