結果
問題 |
No.64 XORフィボナッチ数列
|
ユーザー |
|
提出日時 | 2018-08-19 13:51:10 |
言語 | Java (openjdk 23) |
結果 |
RE
|
実行時間 | - |
コード長 | 491 bytes |
コンパイル時間 | 3,829 ms |
コンパイル使用メモリ | 75,732 KB |
実行使用メモリ | 41,380 KB |
最終ジャッジ日時 | 2024-11-17 04:15:14 |
合計ジャッジ時間 | 6,195 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 1 RE * 10 |
ソースコード
import java.util.*; import java.util.stream.Stream; import java.time.*; import java.time.format.*; public class No64 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int f0 = sc.nextInt(); int f1 = sc.nextInt(); int n = sc.nextInt(); if(n%3 == 0) { System.out.println(f0); }else if(n%3 == 1) { System.out.println(f1); }else { System.out.println(f0 ^ f1); } } }