結果

問題 No.64 XORフィボナッチ数列
ユーザー ytftytft
提出日時 2022-11-07 06:09:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 66 ms / 5,000 ms
コード長 224 bytes
コンパイル時間 267 ms
コンパイル使用メモリ 87,112 KB
実行使用メモリ 71,576 KB
最終ジャッジ日時 2023-09-27 20:59:23
合計ジャッジ時間 2,107 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
71,528 KB
testcase_01 AC 63 ms
71,332 KB
testcase_02 AC 64 ms
71,040 KB
testcase_03 AC 64 ms
71,424 KB
testcase_04 AC 64 ms
71,304 KB
testcase_05 AC 66 ms
71,576 KB
testcase_06 AC 64 ms
71,272 KB
testcase_07 AC 63 ms
71,420 KB
testcase_08 AC 62 ms
71,384 KB
testcase_09 AC 61 ms
71,464 KB
testcase_10 AC 61 ms
71,240 KB
testcase_11 AC 61 ms
71,480 KB
testcase_12 AC 61 ms
71,244 KB
testcase_13 AC 62 ms
71,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda:sys.stdin.readline().rstrip()
ans,F,pt=0,[0,0],0
*F,N=map(int,input().split())
while max(F):
	if (F[0]%2)|(F[1]%2)==1 and (F[0]%2)*2+F[1]%2-N%3-1!=0:
		ans+=1<<pt
	pt+=1
	F[0]>>=1
	F[1]>>=1
print(ans)
0