結果
| 問題 |
No.185 和風
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-10 13:58:13 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 776 bytes |
| コンパイル時間 | 6,990 ms |
| コンパイル使用メモリ | 170,868 KB |
| 実行使用メモリ | 188,692 KB |
| 最終ジャッジ日時 | 2025-11-10 13:58:32 |
| 合計ジャッジ時間 | 7,842 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 MLE * 1 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (89 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
class Program
{
static void Main(string[] args)
{
string inputCount = Console.ReadLine()!;
int count = int.Parse(inputCount);
int ansCopy = -1;
for (int i = 0; i < count; i++)
{
string[] inputNum = Console.ReadLine()!.Split(' ');
if (i == 0 && int.Parse(inputNum[1]) > int.Parse(inputNum[0]))
{
ansCopy = int.Parse(inputNum[1]) - int.Parse(inputNum[0]);
}
else if (ansCopy != int.Parse(inputNum[1]) - int.Parse(inputNum[0]))
{
Console.WriteLine(-1);
ansCopy = -1;
break;
}
}
if (ansCopy != -1)
{
Console.WriteLine(ansCopy);
}
}
}