結果

問題 No.3003 多項式の割り算 〜hard〜
ユーザー anonymously
提出日時 2025-01-17 21:38:31
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 157 bytes
コンパイル時間 631 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 10,112 KB
最終ジャッジ日時 2025-01-17 21:38:34
合計ジャッジ時間 2,230 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B = map(int, input().split())
r = B % 3
if r == 0:
    print(0, A)
elif r == 1:
    print(A, 0)
elif r == 2:
    print(-A, -A)
else:
    raise Exception()
0