結果
問題 |
No.2699 Simple Math (Returned)
|
ユーザー |
|
提出日時 | 2024-03-29 21:28:47 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 222 bytes |
コンパイル時間 | 92 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-09-30 15:37:20 |
合計ジャッジ時間 | 21,922 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 3 TLE * 7 |
ソースコード
#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)