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