結果

問題 No.64 XORフィボナッチ数列
ユーザー tsunabittsunabit
提出日時 2018-08-19 13:52:07
言語 Java21
(openjdk 21)
結果
AC  
実行時間 117 ms / 5,000 ms
コード長 497 bytes
コンパイル時間 4,930 ms
コンパイル使用メモリ 73,968 KB
実行使用メモリ 39,648 KB
最終ジャッジ日時 2023-08-10 19:20:49
合計ジャッジ時間 7,413 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
39,180 KB
testcase_01 AC 114 ms
39,444 KB
testcase_02 AC 112 ms
39,348 KB
testcase_03 AC 111 ms
39,064 KB
testcase_04 AC 112 ms
39,576 KB
testcase_05 AC 113 ms
38,916 KB
testcase_06 AC 117 ms
39,312 KB
testcase_07 AC 110 ms
39,340 KB
testcase_08 AC 111 ms
39,648 KB
testcase_09 AC 108 ms
39,584 KB
testcase_10 AC 112 ms
39,440 KB
testcase_11 AC 112 ms
39,288 KB
testcase_12 AC 114 ms
39,052 KB
testcase_13 AC 115 ms
39,380 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