結果

問題 No.64 XORフィボナッチ数列
ユーザー tsunabittsunabit
提出日時 2018-08-19 13:52:07
言語 Java21
(openjdk 21)
結果
AC  
実行時間 136 ms / 5,000 ms
コード長 497 bytes
コンパイル時間 3,490 ms
コンパイル使用メモリ 77,888 KB
実行使用メモリ 41,456 KB
最終ジャッジ日時 2024-04-28 12:40:05
合計ジャッジ時間 6,145 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
41,388 KB
testcase_01 AC 132 ms
41,364 KB
testcase_02 AC 119 ms
39,960 KB
testcase_03 AC 133 ms
41,408 KB
testcase_04 AC 135 ms
41,292 KB
testcase_05 AC 133 ms
40,912 KB
testcase_06 AC 132 ms
41,112 KB
testcase_07 AC 133 ms
41,348 KB
testcase_08 AC 131 ms
41,264 KB
testcase_09 AC 133 ms
41,416 KB
testcase_10 AC 136 ms
41,456 KB
testcase_11 AC 131 ms
41,264 KB
testcase_12 AC 132 ms
41,380 KB
testcase_13 AC 135 ms
41,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.util.stream.Stream;
import java.time.*;
import java.time.format.*;

public class No64 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
		long f0 = sc.nextLong();
        long f1 = sc.nextLong();
        long n = sc.nextLong();
        if(n%3 == 0) {
            System.out.println(f0);
        }else if(n%3 == 1) {
            System.out.println(f1);
        }else {
            System.out.println(f0 ^ f1);
        }
	}
}
0