結果

問題 No.64 XORフィボナッチ数列
ユーザー AdamantiteAdamantite
提出日時 2023-06-28 00:59:24
言語 C#
(.NET 8.0.203)
結果
WA  
実行時間 -
コード長 575 bytes
コンパイル時間 10,516 ms
コンパイル使用メモリ 144,024 KB
実行使用メモリ 32,964 KB
最終ジャッジ日時 2023-09-17 23:45:48
合計ジャッジ時間 17,940 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
30,152 KB
testcase_01 WA -
testcase_02 AC 49 ms
28,160 KB
testcase_03 WA -
testcase_04 AC 48 ms
28,324 KB
testcase_05 AC 48 ms
28,228 KB
testcase_06 AC 48 ms
28,012 KB
testcase_07 AC 48 ms
28,052 KB
testcase_08 AC 48 ms
28,196 KB
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 132 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 fk1 = f1;
            long fk2 = f0;
            for(long i = 2; i <= n; i++) {
                long fk = fk1 ^ fk2;
                fk2 = fk1;
                fk1 = fk;
            }
            Console.WriteLine(fk1);
        }
    }
}
0