結果
問題 | No.143 豆 |
ユーザー |
![]() |
提出日時 | 2016-12-17 16:15:01 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 26 ms / 1,000 ms |
コード長 | 392 bytes |
コンパイル時間 | 783 ms |
コンパイル使用メモリ | 106,864 KB |
実行使用メモリ | 26,128 KB |
最終ジャッジ日時 | 2024-07-23 10:39:03 |
合計ジャッジ時間 | 1,821 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; class Q0143 { public static void Main() { string[] input0 = Console.ReadLine().Split(' '); int k = int.Parse(input0[0]); int n = int.Parse(input0[1]); int f = int.Parse(input0[2]); int bean = k * n; string[] input1 = Console.ReadLine().Split(' '); for (int i=0; i<f; i++) { bean -= int.Parse(input1[i]); } Console.WriteLine(bean<0 ? -1 : bean); } }