結果

問題 No.64 XORフィボナッチ数列
ユーザー bayashiko_rbayashiko_r
提出日時 2018-11-14 00:57:59
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 5,000 ms
コード長 537 bytes
コンパイル時間 2,001 ms
コンパイル使用メモリ 101,204 KB
実行使用メモリ 22,880 KB
最終ジャッジ日時 2023-08-26 00:59:59
合計ジャッジ時間 3,650 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
22,728 KB
testcase_01 AC 57 ms
20,788 KB
testcase_02 AC 58 ms
22,864 KB
testcase_03 AC 58 ms
22,736 KB
testcase_04 AC 58 ms
20,916 KB
testcase_05 AC 59 ms
22,652 KB
testcase_06 AC 59 ms
22,744 KB
testcase_07 AC 58 ms
22,880 KB
testcase_08 AC 57 ms
22,804 KB
testcase_09 AC 57 ms
20,764 KB
testcase_10 AC 58 ms
22,724 KB
testcase_11 AC 57 ms
20,876 KB
testcase_12 AC 57 ms
22,664 KB
testcase_13 AC 58 ms
20,700 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class Program {
    static void Main(string[] args) {
        //入力
        string s = Console.ReadLine();
        string[] t = s.Split(' ');
        //数字の割り当て
        long F0 = long.Parse(t[0]);
        long F1 = long.Parse(t[1]);
        long N = long.Parse(t[2]);

        //Nのmodで場合分け
        if (N % 3 == 0) {
            Console.WriteLine(F0);
        } else if (N % 3 == 1) {
            Console.WriteLine(F1);
        } else {
            Console.WriteLine(F0 ^ F1);
        }
    }
}
0