結果
| 問題 |
No.64 XORフィボナッチ数列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-02-05 21:57:56 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 253 bytes |
| コンパイル時間 | 81 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-07-08 07:24:30 |
| 合計ジャッジ時間 | 946 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 10 WA * 1 |
ソースコード
# coding: utf-8
f0,f1,n = map(int, input().split(" "))
li = []
li.append(f0)
li.append(f1)
next = 0
for _ in range(2,n):
ne = f0 ^ f1
f0 = f1
f1 = ne
if ne not in li:
li.append(ne)
else:
break
print(li[n % len(li)])