結果
| 問題 |
No.64 XORフィボナッチ数列
|
| コンテスト | |
| ユーザー |
takeya_okino
|
| 提出日時 | 2017-07-08 22:25:23 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 133 ms / 5,000 ms |
| コード長 | 345 bytes |
| コンパイル時間 | 2,146 ms |
| コンパイル使用メモリ | 74,632 KB |
| 実行使用メモリ | 41,408 KB |
| 最終ジャッジ日時 | 2024-10-06 20:12:39 |
| 合計ジャッジ時間 | 4,753 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long f0 = sc.nextLong();
long f1 = sc.nextLong();
long f2 = f0 ^ f1;
long ans = f0;
long N = sc.nextLong();
if(N % 3 == 1) ans = f1;
if(N % 3 == 2) ans = f2;
System.out.println(ans);
}
}
takeya_okino