結果
| 問題 | No.143 豆 |
| コンテスト | |
| ユーザー |
newoota0331
|
| 提出日時 | 2016-09-02 09:12:36 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 79 ms / 1,000 ms |
| コード長 | 600 bytes |
| 記録 | |
| コンパイル時間 | 1,584 ms |
| コンパイル使用メモリ | 81,492 KB |
| 実行使用メモリ | 47,112 KB |
| 最終ジャッジ日時 | 2026-04-03 13:52:55 |
| 合計ジャッジ時間 | 3,265 ms |
|
ジャッジサーバーID (参考情報) |
judge4_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc = new Scanner(System.in);
int mame,hukuro,human,old=0;
mame = sc.nextInt();
hukuro = sc.nextInt();
mame *= hukuro;
human = sc.nextInt();
for(int i=0;i<human;i++){
old += sc.nextInt();
}
mame -= old;
if(mame>=0){
System.out.println(mame);
}else{
System.out.println(-1);
}
}
}
newoota0331