結果

問題 No.64 XORフィボナッチ数列
ユーザー GrenacheGrenache
提出日時 2015-09-22 23:53:36
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 395 bytes
コンパイル時間 3,122 ms
コンパイル使用メモリ 71,328 KB
実行使用メモリ 55,936 KB
最終ジャッジ日時 2023-09-26 14:31:23
合計ジャッジ時間 5,790 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,788 KB
testcase_01 AC 121 ms
55,708 KB
testcase_02 AC 125 ms
55,740 KB
testcase_03 AC 124 ms
55,936 KB
testcase_04 AC 124 ms
55,720 KB
testcase_05 AC 122 ms
53,740 KB
testcase_06 AC 122 ms
55,832 KB
testcase_07 AC 120 ms
55,684 KB
testcase_08 AC 120 ms
55,436 KB
testcase_09 AC 123 ms
55,440 KB
testcase_10 AC 121 ms
55,688 KB
testcase_11 AC 123 ms
55,780 KB
testcase_12 AC 122 ms
55,792 KB
testcase_13 AC 121 ms
55,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main_yukicoder64 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long[] f = new long[3];
        f[0] = sc.nextLong();
        f[1] = sc.nextLong();
        f[2] = f[0] ^ f[1];
        long n = sc.nextLong();
        
        System.out.println(f[(int)(n % 3)]);
        
        sc.close();
    }
}
0