結果

問題 No.2699 Simple Math (Returned)
ユーザー hirayuu_ychirayuu_yc
提出日時 2024-02-06 16:09:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 780 ms / 2,000 ms
コード長 200 bytes
コンパイル時間 318 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 76,152 KB
最終ジャッジ日時 2024-02-06 16:09:32
合計ジャッジ時間 9,584 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,460 KB
testcase_01 AC 511 ms
75,896 KB
testcase_02 AC 674 ms
75,896 KB
testcase_03 AC 524 ms
75,892 KB
testcase_04 AC 780 ms
76,024 KB
testcase_05 AC 639 ms
75,896 KB
testcase_06 AC 607 ms
75,896 KB
testcase_07 AC 734 ms
76,024 KB
testcase_08 AC 761 ms
76,024 KB
testcase_09 AC 750 ms
76,152 KB
testcase_10 AC 718 ms
76,152 KB
testcase_11 AC 741 ms
76,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T=int(input())
for i in range(T):
	N,M=map(int,input().split())
	N%=M*2
	if N<=M:
		print((pow(10,N,998244353)-1)%998244353)
	else:
		print((pow(10,M*2-N,998244353)-1)*pow(10,N-M,998244353)%998244353)
0