No.64 XOR Fibonacci Sequence
レベル :
/ AI推定難易度 : 214
/ 実行時間制限 : 1ケース 5.000秒 / メモリ制限
: 512 MB / 標準ジャッジ問題
タグ : / 解いたユーザー数 664
作問者 :
sugim48
タグ : / 解いたユーザー数 664
作問者 :
sugim48
問題文最終更新日: 2026-06-25 06:51:14
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 51
(順位表)
の他の問題:
Problem Statement
Define the integer sequence $\{F_k\}$ by the following recurrence relation.
$F_k=F_{k-1}\oplus F_{k-2}(k\geq2)$
Here, $\oplus$ denotes the bitwise XOR operator.
Given $F_0,F_1$, compute $F_N$.
Input
$F_0$ $F_1$ $N$
$0\leq F_0,F_1,N\leq10^{18}$
Note that these values may not fit in a 32-bit integer type.
Output
Print the value of $F_N$ on one line.
Print a newline at the end.
Sample
Sample 1
Input
88 79 2
Output
23
Sample 2
Input
88 79 0
Output
88
Sample 3
Input
88 79 82
Output
79
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。