結果
| 問題 |
No.143 豆
|
| コンテスト | |
| ユーザー |
Tsukasa_Type
|
| 提出日時 | 2018-02-09 14:01:24 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 140 ms / 1,000 ms |
| コード長 | 341 bytes |
| コンパイル時間 | 1,955 ms |
| コンパイル使用メモリ | 74,148 KB |
| 実行使用メモリ | 54,572 KB |
| 最終ジャッジ日時 | 2024-07-23 10:54:19 |
| 合計ジャッジ時間 | 5,039 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
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