結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー | YamaKasa |
提出日時 | 2018-05-11 23:25:25 |
言語 | Java21 (openjdk 21) |
結果 |
RE
|
実行時間 | - |
コード長 | 379 bytes |
コンパイル時間 | 2,239 ms |
コンパイル使用メモリ | 71,260 KB |
実行使用メモリ | 57,740 KB |
最終ジャッジ日時 | 2023-09-10 17:51:58 |
合計ジャッジ時間 | 5,079 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 127 ms
55,336 KB |
testcase_01 | AC | 128 ms
55,420 KB |
testcase_02 | AC | 125 ms
55,800 KB |
testcase_03 | RE | - |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | RE | - |
testcase_11 | RE | - |
testcase_12 | AC | 127 ms
55,476 KB |
testcase_13 | RE | - |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); long F0 = scan.nextInt(); long F1 = scan.nextInt(); long N = scan.nextLong(); scan.close(); long ans = 0; if(N % 3 == 0) { ans = F0; }else if(N % 3 == 1) { ans = F1; }else { ans = F0 ^ F1; } System.out.println(ans); } }