結果

問題 No.2699 Simple Math (Returned)
ユーザー hirayuu_ychirayuu_yc
提出日時 2024-02-06 16:14:24
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 200 bytes
コンパイル時間 401 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 9,984 KB
最終ジャッジ日時 2024-02-06 16:14:47
合計ジャッジ時間 22,301 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
9,984 KB
testcase_01 AC 1,233 ms
9,984 KB
testcase_02 AC 1,847 ms
9,984 KB
testcase_03 AC 1,207 ms
9,984 KB
testcase_04 TLE -
testcase_05 AC 1,726 ms
9,984 KB
testcase_06 AC 1,535 ms
9,984 KB
testcase_07 TLE -
testcase_08 TLE -
testcase_09 TLE -
testcase_10 TLE -
testcase_11 TLE -
権限があれば一括ダウンロードができます

ソースコード

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