結果

問題 No.64 XORフィボナッチ数列
ユーザー AdamantiteAdamantite
提出日時 2023-06-28 01:07:33
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 49 ms / 5,000 ms
コード長 706 bytes
コンパイル時間 13,640 ms
コンパイル使用メモリ 148,716 KB
実行使用メモリ 165,512 KB
最終ジャッジ日時 2023-09-17 23:59:44
合計ジャッジ時間 8,566 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
28,068 KB
testcase_01 AC 46 ms
28,096 KB
testcase_02 AC 47 ms
27,928 KB
testcase_03 AC 48 ms
27,992 KB
testcase_04 AC 46 ms
28,016 KB
testcase_05 AC 47 ms
27,796 KB
testcase_06 AC 47 ms
29,932 KB
testcase_07 AC 48 ms
29,800 KB
testcase_08 AC 48 ms
29,980 KB
testcase_09 AC 47 ms
29,968 KB
testcase_10 AC 46 ms
30,028 KB
testcase_11 AC 47 ms
28,140 KB
testcase_12 AC 49 ms
27,872 KB
testcase_13 AC 48 ms
165,512 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 137 ms).
.NET 向け Microsoft (R) Build Engine バージョン 17.0.0-preview-21470-01+cb055d28f
Copyright (C) Microsoft Corporation.All rights reserved.

  プレビュー版の .NET を使用しています。https://aka.ms/dotnet-core-preview をご覧ください
  main -> /home/judge/data/code/bin/Release/net6.0/main.dll
  main -> /home/judge/data/code/bin/Release/net6.0/publish/

ソースコード

diff #

using System;

namespace No64_XORFibonacciSequence
{
    internal class Program
    {
        static void Main(string[] args) {
            string[] param = Console.ReadLine().Split(' ');
            long f0 = long.Parse(param[0]);
            long f1 = long.Parse(param[1]);
            long n = long.Parse(param[2]);

            long result = 0;
            switch (n % 3) {
                case 0:
                    result = f0;
                    break;
                case 1:
                    result = f1;
                    break;
                case 2:
                    result = f1 ^ f0;
                    break;
            }
            Console.WriteLine(result);
        }
    }
}
0