結果
問題 |
No.369 足し間違い
|
ユーザー |
|
提出日時 | 2016-07-18 16:32:00 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 210 ms / 2,000 ms |
コード長 | 471 bytes |
コンパイル時間 | 3,378 ms |
コンパイル使用メモリ | 74,620 KB |
実行使用メモリ | 56,820 KB |
最終ジャッジ日時 | 2024-10-15 16:58:50 |
合計ジャッジ時間 | 5,439 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
import java.util.Scanner; public class Study03 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.nextLine(); int first = Integer.parseInt(a); String sss = sc.nextLine(); String [] q = sss.split(" "); int num = 0; int[] sds = new int[q.length]; for(int i=0;i<q.length;i++){ sds[i] = Integer.parseInt(q[i]); num += sds[i]; } int last = sc.nextInt(); System.out.println(num-last); } }