結果

問題 No.627 ランダムウォークの軌跡
ユーザー No
提出日時 2018-01-05 22:15:33
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 565 bytes
コンパイル時間 4,275 ms
コンパイル使用メモリ 107,560 KB
実行使用メモリ 27,840 KB
最終ジャッジ日時 2024-12-23 06:43:43
合計ジャッジ時間 3,919 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11 WA * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace y
{
    class Program
    {
        static void Main(string[] args)
        {
            int c = int.Parse(Console.ReadLine());
            int t = 0;
            bool f = true;

            for (int i = 0 ; i < c ; i++)
            {
                int n = int.Parse(Console.ReadLine());
                if (n != t + 1 && n != t - 1)
                {
                    f = false;
                    break;
                }
            }
     
            if (f) Console.WriteLine("T");
else Console.WriteLine("F");
        }
    }
}
0