結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー | k_kadora |
提出日時 | 2015-05-22 02:20:35 |
言語 | Java21 (openjdk 21) |
結果 |
RE
|
実行時間 | - |
コード長 | 348 bytes |
コンパイル時間 | 4,289 ms |
コンパイル使用メモリ | 72,296 KB |
実行使用メモリ | 56,032 KB |
最終ジャッジ日時 | 2023-09-20 08:43:11 |
合計ジャッジ時間 | 6,030 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 128 ms
55,328 KB |
testcase_01 | AC | 128 ms
55,728 KB |
testcase_02 | AC | 130 ms
55,492 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 | 134 ms
56,032 KB |
testcase_13 | RE | - |
ソースコード
import java.util.*; public class Fib{ public static void main(String[] arg){ Scanner sc = new Scanner(System.in); long f0,f1,f2,n; f0 = sc.nextInt(); f1 = sc.nextInt(); n = sc.nextInt(); 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); } } }