結果
| 問題 | No.143 豆 |
| コンテスト | |
| ユーザー |
mits58
|
| 提出日時 | 2016-05-05 14:17:12 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 61 ms / 1,000 ms |
| コード長 | 349 bytes |
| 記録 | |
| コンパイル時間 | 1,589 ms |
| コンパイル使用メモリ | 82,080 KB |
| 実行使用メモリ | 46,948 KB |
| 最終ジャッジ日時 | 2026-04-03 13:51:54 |
| 合計ジャッジ時間 | 3,244 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNext()){
int sum=sc.nextInt()*sc.nextInt();
int f=sc.nextInt();
for(int i=0;i<f;i++) sum-=sc.nextInt();
System.out.println(Math.max(sum, -1));
}
}
}
mits58