結果
問題 |
No.64 XORフィボナッチ数列
|
ユーザー |
![]() |
提出日時 | 2018-05-11 23:23:51 |
言語 | Java (openjdk 23) |
結果 |
RE
|
実行時間 | - |
コード長 | 376 bytes |
コンパイル時間 | 2,068 ms |
コンパイル使用メモリ | 74,156 KB |
実行使用メモリ | 54,264 KB |
最終ジャッジ日時 | 2024-06-28 09:02:47 |
合計ジャッジ時間 | 4,728 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 1 RE * 10 |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int F0 = scan.nextInt(); int F1 = scan.nextInt(); long N = scan.nextLong(); scan.close(); int ans = 0; if(N % 3 == 0) { ans = F0; }else if(N % 3 == 1) { ans = F1; }else { ans = F0 ^ F1; } System.out.println(ans); } }