結果
| 問題 | No.143 豆 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-25 13:33:50 |
| 言語 | C# (.NET 10.0.201) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 703 bytes |
| 記録 | |
| コンパイル時間 | 6,753 ms |
| コンパイル使用メモリ | 172,184 KB |
| 実行使用メモリ | 192,920 KB |
| 最終ジャッジ日時 | 2026-04-09 01:09:09 |
| 合計ジャッジ時間 | 9,076 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 WA * 1 MLE * 1 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (91 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
using System;
namespace yukicoder
{
class Program
{
static void Main(string[] args)
{
string[] str = Console.ReadLine().Split(' ');
string[] str1 = Console.ReadLine().Split(' ');
int a = int.Parse(str[0]);
int b = int.Parse(str[1]);
int c = int.Parse(str[2]);
int num = 0;
for(int i = 0; i < c; i++)
{
num += int.Parse(str1[i]);
}
int ans = (a * b) - num;
if (ans > 0)
{
Console.WriteLine(ans.ToString());
return;
}
Console.WriteLine("-1");
}
}
}