結果

問題 No.692 square1001 and Permutation 1
ユーザー CroweaCrowea
提出日時 2019-01-21 01:20:40
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 716 bytes
コンパイル時間 1,116 ms
コンパイル使用メモリ 55,056 KB
実行使用メモリ 28,296 KB
最終ジャッジ日時 2023-10-12 08:54:10
合計ジャッジ時間 5,059 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 216 ms
14,680 KB
testcase_03 AC 52 ms
14,624 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