結果
| 問題 | No.143 豆 |
| コンテスト | |
| ユーザー |
Tsukasa_Type
|
| 提出日時 | 2018-02-09 14:00:32 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 341 bytes |
| 記録 | |
| コンパイル時間 | 2,302 ms |
| コンパイル使用メモリ | 74,560 KB |
| 実行使用メモリ | 41,552 KB |
| 最終ジャッジ日時 | 2024-10-06 09:50:02 |
| 合計ジャッジ時間 | 5,307 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 11 |
ソースコード
import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int a = sc.nextInt();
int b = sc.nextInt();
int mame = a + b;
int n = sc.nextInt();
for (int i=0; i<n; i++) {
int temp = sc.nextInt();
mame -= temp;
}
System.out.println(mame<0?"-1":mame);
}
}
Tsukasa_Type