結果
| 問題 | No.143 豆 |
| コンテスト | |
| ユーザー |
newoota0331
|
| 提出日時 | 2016-09-02 09:12:36 |
| 言語 | Java (openjdk 26.0.2.1) |
| 結果 |
AC
|
| 実行時間 | 61 ms / 1,000 ms |
| + 194µs | |
| コード長 | 600 bytes |
| 記録 | |
| コンパイル時間 | 1,573 ms |
| コンパイル使用メモリ | 84,232 KB |
| 実行使用メモリ | 43,252 KB |
| 最終ジャッジ日時 | 2026-08-23 23:38:38 |
| 合計ジャッジ時間 | 4,011 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_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