結果

問題 No.64 XORフィボナッチ数列
ユーザー kaminomisosirukaminomisosiru
提出日時 2018-02-05 13:48:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 218 bytes
コンパイル時間 717 ms
コンパイル使用メモリ 10,640 KB
実行使用メモリ 12,452 KB
最終ジャッジ日時 2023-09-21 21:05:28
合計ジャッジ時間 7,807 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,820 KB
testcase_01 AC 15 ms
7,876 KB
testcase_02 AC 14 ms
7,792 KB
testcase_03 AC 14 ms
7,872 KB
testcase_04 AC 14 ms
7,840 KB
testcase_05 AC 14 ms
7,788 KB
testcase_06 AC 15 ms
7,772 KB
testcase_07 AC 14 ms
7,892 KB
testcase_08 AC 14 ms
7,824 KB
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8

f0,f1,n = map(int,input().split(" "))

res = 0
if n == 0:
    print(f0)
elif n == 1:
    print(f1)
else:
    for i in range(2,n+1):
        res = f1 ^ f0
        f0 = f1
        f1 = res
    print(res)
0