結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー | kaminomisosiru |
提出日時 | 2018-02-05 21:57:56 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 253 bytes |
コンパイル時間 | 72 ms |
コンパイル使用メモリ | 10,720 KB |
実行使用メモリ | 7,984 KB |
最終ジャッジ日時 | 2023-09-22 15:53:47 |
合計ジャッジ時間 | 1,083 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 16 ms
7,788 KB |
testcase_02 | AC | 15 ms
7,956 KB |
testcase_03 | AC | 15 ms
7,752 KB |
testcase_04 | AC | 14 ms
7,832 KB |
testcase_05 | WA | - |
testcase_06 | AC | 15 ms
7,792 KB |
testcase_07 | AC | 15 ms
7,812 KB |
testcase_08 | AC | 15 ms
7,908 KB |
testcase_09 | AC | 15 ms
7,976 KB |
testcase_10 | AC | 15 ms
7,832 KB |
testcase_11 | AC | 14 ms
7,952 KB |
testcase_12 | AC | 15 ms
7,844 KB |
testcase_13 | AC | 15 ms
7,840 KB |
ソースコード
# 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)])