結果

問題 No.692 square1001 and Permutation 1
ユーザー CroweaCrowea
提出日時 2019-01-21 12:18:41
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 1,927 ms / 2,000 ms
コード長 757 bytes
コンパイル時間 817 ms
コンパイル使用メモリ 63,340 KB
実行使用メモリ 22,792 KB
最終ジャッジ日時 2023-10-13 17:15:06
合計ジャッジ時間 5,760 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
20,772 KB
testcase_01 AC 53 ms
20,740 KB
testcase_02 AC 90 ms
22,792 KB
testcase_03 AC 53 ms
20,704 KB
testcase_04 AC 1,927 ms
20,632 KB
testcase_05 AC 56 ms
20,760 KB
testcase_06 AC 1,915 ms
20,568 KB
testcase_07 AC 55 ms
20,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
    static class Player
    {
        internal static string Petr = "Petr";
        internal static string square1001 = "square1001";
        internal static string currentPlayer = Petr;
        internal static string winner = "";
    }
    static void Main(string[] args)
    {
        var pn = int.Parse(Console.ReadLine());
        while(pn >= 0)
        { 
            pn--;
            if (pn == 0)
            {
                Player.winner = Player.currentPlayer == Player.Petr ? Player.square1001 : Player.Petr;
                break;
            }
            Player.currentPlayer = Player.square1001;
        }
        Console.WriteLine(Player.winner);
    }
}

0