結果

問題 No.64 XORフィボナッチ数列
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-13 23:38:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 440 bytes
コンパイル時間 4,649 ms
コンパイル使用メモリ 71,872 KB
実行使用メモリ 56,428 KB
最終ジャッジ日時 2023-08-17 04:29:54
合計ジャッジ時間 5,531 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
55,532 KB
testcase_01 AC 125 ms
56,008 KB
testcase_02 AC 125 ms
55,612 KB
testcase_03 AC 125 ms
55,992 KB
testcase_04 AC 125 ms
55,612 KB
testcase_05 AC 124 ms
56,072 KB
testcase_06 AC 124 ms
55,756 KB
testcase_07 AC 124 ms
55,632 KB
testcase_08 AC 124 ms
55,768 KB
testcase_09 AC 127 ms
55,772 KB
testcase_10 AC 123 ms
55,724 KB
testcase_11 AC 125 ms
55,984 KB
testcase_12 AC 124 ms
53,384 KB
testcase_13 AC 123 ms
56,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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