結果
問題 |
No.64 XORフィボナッチ数列
|
ユーザー |
![]() |
提出日時 | 2018-05-11 23:25:25 |
言語 | Java (openjdk 23) |
結果 |
RE
|
実行時間 | - |
コード長 | 379 bytes |
コンパイル時間 | 2,118 ms |
コンパイル使用メモリ | 73,892 KB |
実行使用メモリ | 54,196 KB |
最終ジャッジ日時 | 2024-06-28 09:03:05 |
合計ジャッジ時間 | 4,771 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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); 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); } }