結果
| 問題 |
No.64 XORフィボナッチ数列
|
| コンテスト | |
| ユーザー |
bellangeldindon
|
| 提出日時 | 2019-05-07 11:56:31 |
| 言語 | Python2 (2.7.18) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 273 bytes |
| コンパイル時間 | 94 ms |
| コンパイル使用メモリ | 6,912 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2024-07-01 23:32:36 |
| 合計ジャッジ時間 | 880 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 RE * 4 |
ソースコード
f0, f1, N = map(int, raw_input().split()) xorfib = [f0, f1] memo = [[f0, f1]] for i in range(2, N+1): tmp = xorfib[i-1] ^ xorfib[i-2] if [xorfib[i-1], tmp] in memo: xorfib.pop(-1) break xorfib.append(tmp) memo.append([xorfib[i-1], tmp]) print xorfib[N%len(xorfib)]
bellangeldindon