結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー | 37zigen |
提出日時 | 2016-04-01 11:51:23 |
言語 | Java21 (openjdk 21) |
結果 |
RE
|
実行時間 | - |
コード長 | 333 bytes |
コンパイル時間 | 2,249 ms |
コンパイル使用メモリ | 74,468 KB |
実行使用メモリ | 54,472 KB |
最終ジャッジ日時 | 2024-04-10 07:03:52 |
合計ジャッジ時間 | 4,249 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 122 ms
53,832 KB |
testcase_01 | AC | 107 ms
52,884 KB |
testcase_02 | AC | 114 ms
54,272 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 | 105 ms
52,684 KB |
testcase_13 | RE | - |
ソースコード
package yukicoder064; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc=new Scanner(System.in); long f0=sc.nextInt(); long f1=sc.nextInt(); long n=sc.nextInt(); for(int i=0;i<n-1;i++){ long f2=f1^f0; f0=f1; f1=f2; } if(n==0)f1=f0; System.out.println(f1); } }