結果

問題 No.64 XORフィボナッチ数列
ユーザー Mcpu3Mcpu3
提出日時 2018-09-29 16:08:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 5,000 ms
コード長 377 bytes
コンパイル時間 2,134 ms
コンパイル使用メモリ 73,992 KB
実行使用メモリ 41,600 KB
最終ジャッジ日時 2024-04-20 12:52:27
合計ジャッジ時間 4,595 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
41,408 KB
testcase_01 AC 123 ms
41,064 KB
testcase_02 AC 126 ms
41,356 KB
testcase_03 AC 131 ms
41,316 KB
testcase_04 AC 127 ms
41,600 KB
testcase_05 AC 129 ms
41,356 KB
testcase_06 AC 129 ms
41,408 KB
testcase_07 AC 115 ms
40,536 KB
testcase_08 AC 126 ms
41,256 KB
testcase_09 AC 115 ms
39,980 KB
testcase_10 AC 126 ms
41,248 KB
testcase_11 AC 130 ms
41,336 KB
testcase_12 AC 118 ms
40,920 KB
testcase_13 AC 129 ms
41,196 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long F0 = sc.nextLong(), F1 = sc.nextLong(), N = sc.nextLong();
        sc.close();
        if (N % 3 == 0) System.out.print(F0);
        else if (N % 3 == 1) System.out.print(F1);
        else System.out.print(F0 ^ F1);
    }
}
0