結果
問題 |
No.143 豆
|
ユーザー |
|
提出日時 | 2020-12-24 23:24:17 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 581 bytes |
コンパイル時間 | 2,152 ms |
コンパイル使用メモリ | 79,756 KB |
実行使用メモリ | 51,164 KB |
最終ジャッジ日時 | 2024-09-21 17:06:27 |
合計ジャッジ時間 | 3,980 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 1 |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.stream.Stream; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); //K N F int[] teisu = Stream.of(br.readLine().split(" ")).mapToInt(Integer::parseInt).toArray(); int count = teisu[0] * teisu[1]; //年齢 int sum = Stream.of(br.readLine().split(" ")).mapToInt(Integer::parseInt).sum(); System.out.println((count - sum) > 0 ? count - sum : "-1"); } }