結果

問題 No.692 square1001 and Permutation 1
ユーザー CroweaCrowea
提出日時 2019-01-21 01:21:33
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 716 bytes
コンパイル時間 732 ms
コンパイル使用メモリ 65,404 KB
実行使用メモリ 25,080 KB
最終ジャッジ日時 2023-10-12 08:55:44
合計ジャッジ時間 4,653 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 217 ms
22,756 KB
testcase_03 AC 52 ms
20,724 KB
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

class Program
{
    /// <summary>
    /// 選手クラス
    /// </summary>
    static class Players
    {
        public static string Petr = "Petr";
        public static string square1001 = "square1001";
    }

    static void Main(string[] args)
    {
        // 入力
        var permutation = int.Parse(Console.ReadLine());
        string currentPlayer = "";
        string nextPlayer = Players.Petr;
        while (permutation != 0)
        {
            currentPlayer = nextPlayer;
            permutation--;
            nextPlayer = currentPlayer == Players.Petr ? Players.square1001 : Players.Petr;
        }
        var winner = currentPlayer;
        Console.WriteLine(winner);
    }
}

0