結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー |
![]() |
提出日時 | 2017-04-25 22:49:34 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 54 ms / 5,000 ms |
コード長 | 634 bytes |
コンパイル時間 | 2,938 ms |
コンパイル使用メモリ | 74,688 KB |
実行使用メモリ | 50,372 KB |
最終ジャッジ日時 | 2024-09-13 11:41:23 |
合計ジャッジ時間 | 3,465 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.Arrays;public class Main {public static void main(String[] args) throws IOException {BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));String[] inputs = reader.readLine().split(" ");long f0 = Long.parseLong(inputs[0]);long f1 = Long.parseLong(inputs[1]);long N = Long.parseLong(inputs[2]);long[] fs = new long[3];fs[0] = f0;fs[1] = f1;fs[2] = f1 ^ f0;System.out.println(fs[(int)(N % 3)]);}}