結果
問題 |
No.627 ランダムウォークの軌跡
|
ユーザー |
|
提出日時 | 2020-06-29 17:54:28 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 563 bytes |
コンパイル時間 | 2,390 ms |
コンパイル使用メモリ | 103,168 KB |
実行使用メモリ | 17,664 KB |
最終ジャッジ日時 | 2024-07-18 21:27:52 |
合計ジャッジ時間 | 4,342 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 WA * 2 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; namespace _0627 { class Program { static void Main(string[] args) { var t = int.Parse(Console.ReadLine()); var p = int.Parse(Console.ReadLine()); var f = true; for(var i = 0; i < t - 1; i++){ var x = int.Parse(Console.ReadLine()); if((x == p + 1) || (x == p - 1)){ p = x; }else{ f = false; } } Console.WriteLine(f ? "T" : "F"); } } }