No.3003 Polynomial Division ~hard~
レベル :
/ AI推定難易度 : 575
/ 実行時間制限 : 1ケース 2.000秒 / メモリ制限
: 512 MB / 標準ジャッジ問題
タグ : / 解いたユーザー数 89
作問者 :
ジュ・ビオレ・グレイス
/ テスター :
👑
p-adic
タグ : / 解いたユーザー数 89
作問者 :
ジュ・ビオレ・グレイス
/ テスター :
👑
問題文最終更新日: 2025-01-12 00:57:50
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 455
(順位表)
の他の問題:
Problem Statement
Given integers $A, B$ from the input, find the remainder when the polynomial $A x^B$ is divided by $x^2 + x + 1$.
Input
$A \ B$
$-10^{18} \leq A \leq10^{18},$
$0 \leq B \leq 10^{18}$
Output
When the remainder is expressed as $ax + b$, output $a \ b$ separated by a single half-width space, followed by a newline.
Sample
Sample 1
Input
10000 10000
Output
10000 0
Sample 2
Input
20000 20000
Output
-20000 -20000
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。