結果

問題 No.524 コインゲーム
ユーザー RisenRisen
提出日時 2017-06-03 00:09:31
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 295 bytes
コンパイル時間 771 ms
コンパイル使用メモリ 107,932 KB
実行使用メモリ 23,892 KB
最終ジャッジ日時 2023-10-22 02:00:30
合計ジャッジ時間 2,695 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
23,848 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 24 ms
23,848 KB
testcase_04 AC 23 ms
23,848 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 23 ms
23,848 KB
testcase_09 AC 23 ms
23,848 KB
testcase_10 AC 23 ms
23,848 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 23 ms
23,848 KB
testcase_17 AC 23 ms
23,848 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 23 ms
23,848 KB
testcase_21 WA -
testcase_22 AC 23 ms
23,848 KB
testcase_23 AC 23 ms
23,848 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 23 ms
23,848 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 23 ms
23,848 KB
testcase_33 WA -
testcase_34 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Solution
{
    public static void Main()
    {
        var n = long.Parse(Console.ReadLine());
        var sum = (n * (n + 1)) / 2;
        while ((sum & 0x1) == 1)
        {
            sum >>= 1;
        }

        Console.WriteLine((sum == 0) ? "O" : "X");
    }
}
0