結果
| 問題 |
No.143 豆
|
| コンテスト | |
| ユーザー |
mits58
|
| 提出日時 | 2016-05-05 14:17:12 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 145 ms / 1,000 ms |
| コード長 | 349 bytes |
| コンパイル時間 | 2,004 ms |
| コンパイル使用メモリ | 75,012 KB |
| 実行使用メモリ | 54,388 KB |
| 最終ジャッジ日時 | 2024-07-23 10:30:02 |
| 合計ジャッジ時間 | 5,043 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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