結果
| 問題 | No.64 XORフィボナッチ数列 |
| コンテスト | |
| ユーザー |
kou6839
|
| 提出日時 | 2014-11-21 22:25:10 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 426 bytes |
| 記録 | |
| コンパイル時間 | 1,648 ms |
| コンパイル使用メモリ | 81,928 KB |
| 実行使用メモリ | 41,580 KB |
| 最終ジャッジ日時 | 2026-06-06 07:00:58 |
| 合計ジャッジ時間 | 9,436 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 TLE * 1 -- * 4 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
long m=sc.nextLong();
long l=sc.nextLong();
if(l==1){
System.out.println(m);
return;
}
if(l==0){
System.out.println(n);
return;
}
for(int i=1;i<=l-1;i++){
long temp=m;
m^=n;
n=temp;
}
System.out.println(m);
}
}
kou6839