結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー | shinwisteria |
提出日時 | 2019-01-21 23:17:18 |
言語 | Java19 (openjdk 21) |
結果 |
AC
|
実行時間 | 129 ms / 5,000 ms |
コード長 | 368 bytes |
コンパイル時間 | 6,081 ms |
コンパイル使用メモリ | 72,224 KB |
実行使用メモリ | 56,164 KB |
最終ジャッジ日時 | 2023-10-13 17:29:22 |
合計ジャッジ時間 | 7,507 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 126 ms
56,044 KB |
testcase_01 | AC | 125 ms
55,564 KB |
testcase_02 | AC | 124 ms
55,796 KB |
testcase_03 | AC | 119 ms
56,024 KB |
testcase_04 | AC | 125 ms
56,164 KB |
testcase_05 | AC | 128 ms
53,864 KB |
testcase_06 | AC | 129 ms
55,892 KB |
testcase_07 | AC | 128 ms
55,796 KB |
testcase_08 | AC | 128 ms
55,660 KB |
testcase_09 | AC | 126 ms
55,480 KB |
testcase_10 | AC | 128 ms
55,980 KB |
testcase_11 | AC | 128 ms
55,724 KB |
testcase_12 | AC | 129 ms
55,936 KB |
testcase_13 | AC | 129 ms
55,808 KB |
ソースコード
import java.util.Scanner; public class No64 { public static void main(String[] args) { Scanner s = new Scanner(System.in); long f0 = s.nextLong() , f1 = s.nextLong() , N = s.nextLong(); s.close(); long f2 = f0 ^ f1; if(N % 3 == 0){ System.out.println(f0); }else if(N % 3 ==1){ System.out.println(f1); }else{ System.out.println(f2); } } }