結果
問題 | No.185 和風 |
ユーザー | kmtrc130 |
提出日時 | 2019-03-18 15:35:53 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 61 ms / 1,000 ms |
コード長 | 707 bytes |
コンパイル時間 | 2,696 ms |
コンパイル使用メモリ | 102,640 KB |
実行使用メモリ | 22,644 KB |
最終ジャッジ日時 | 2023-09-25 12:53:15 |
合計ジャッジ時間 | 3,373 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 59 ms
20,748 KB |
testcase_01 | AC | 59 ms
20,740 KB |
testcase_02 | AC | 57 ms
20,736 KB |
testcase_03 | AC | 59 ms
20,648 KB |
testcase_04 | AC | 59 ms
22,644 KB |
testcase_05 | AC | 59 ms
20,632 KB |
testcase_06 | AC | 61 ms
20,660 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; class Program { public void Solve() { int N = int.Parse(Console.ReadLine()); string[] XY = Console.ReadLine().Split(' '); int shikaku = int.Parse(XY[1]) - int.Parse(XY[0]); for (int i = 1; i < N; i++) { XY = Console.ReadLine().Split(' '); if (shikaku != int.Parse(XY[1]) - int.Parse(XY[0])) { shikaku = -1; break; } } if (shikaku <= 0) { shikaku = -1; } Console.WriteLine(shikaku); } static void Main() { var solver = new Program(); solver.Solve(); } }