結果
| 問題 | No.143 豆 |
| コンテスト | |
| ユーザー |
mits58
|
| 提出日時 | 2016-05-05 14:17:12 |
| 言語 | Java (openjdk 26.0.2.1) |
| 結果 |
AC
|
| 実行時間 | 59 ms / 1,000 ms |
| + 986µs | |
| コード長 | 349 bytes |
| 記録 | |
| コンパイル時間 | 1,370 ms |
| コンパイル使用メモリ | 83,960 KB |
| 実行使用メモリ | 43,380 KB |
| 最終ジャッジ日時 | 2026-08-23 23:33:27 |
| 合計ジャッジ時間 | 3,879 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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