結果
| 問題 | No.2699 Simple Math (Returned) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-29 21:28:47 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 222 bytes |
| 記録 | |
| コンパイル時間 | 953 ms |
| コンパイル使用メモリ | 20,440 KB |
| 実行使用メモリ | 15,232 KB |
| 最終ジャッジ日時 | 2026-04-16 18:20:58 |
| 合計ジャッジ時間 | 14,247 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 2 WA * 9 |
ソースコード
#N=qM+rとすると、10^N-1を10^M+1で割った余りは(-1)^q*10^r-1
T=int(input())
for i in range(T):
N,M=map(int,input().split())
q=N//M
r=N%M
a=[1,-1][q%2]*pow(10,r,998244353)-1
print(a%998244353)