結果

問題 No.2699 Simple Math (Returned)
ユーザー tassei903tassei903
提出日時 2024-03-29 22:04:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 529 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 78,364 KB
最終ジャッジ日時 2024-03-29 22:04:58
合計ジャッジ時間 5,318 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 163 ms
78,364 KB
testcase_02 AC 312 ms
76,408 KB
testcase_03 AC 161 ms
77,940 KB
testcase_04 WA -
testcase_05 AC 300 ms
76,432 KB
testcase_06 AC 240 ms
76,688 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################
mod = 998244353
for _ in range(ni()):
    n, m = na()
    n %= 2*m
    if n < m:
        print((pow(10, n, mod)-1))
    else:
        print((pow(10, m, mod)-pow(10, n-m, mod)))
0