結果

問題 No.2699 Simple Math (Returned)
ユーザー moon17moon17
提出日時 2024-03-29 23:33:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 800 ms / 2,000 ms
コード長 175 bytes
コンパイル時間 321 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 76,016 KB
最終ジャッジ日時 2024-03-29 23:34:02
合計ジャッジ時間 9,733 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 527 ms
75,760 KB
testcase_02 AC 693 ms
75,760 KB
testcase_03 AC 518 ms
75,760 KB
testcase_04 AC 800 ms
75,888 KB
testcase_05 AC 649 ms
75,760 KB
testcase_06 AC 588 ms
75,760 KB
testcase_07 AC 738 ms
75,888 KB
testcase_08 AC 753 ms
75,888 KB
testcase_09 AC 775 ms
76,016 KB
testcase_10 AC 744 ms
76,016 KB
testcase_11 AC 757 ms
76,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t=int(input())
M=998244353
for _ in range(t):
  n,m=map(int,input().split())
  n%=2*m
  if n<=m:
    ans=pow(10,n,M)-1
  else:
    ans=pow(10,m,M)-pow(10,n-m,M)
  print(ans%M)
0