#A. 好多简单题

    Type: Default File IO: easy 3000ms 256MiB

好多简单题

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目背景

小明正在学习 C++,它入门的第一道题就是大名鼎鼎的 A+B Problem,它在做完这道题之后还不是很满足。于是他想知道所有 A+B Problem 的一些性质,请你帮帮他!

题目描述

考虑这样的一个问题,给定正整数 A,BA,B 输出这样格式的东西:A+B=C,其中 C=A+BC=A+B 且不含前导零。如:

  • A=1,B=2A=1,B=2,答案是 1+2=3
  • A=11,B=998A=11,B=998,答案是 11+998=1009

考虑把答案字符串的长度为 f(A,B)f(A,B),如 f(11,998)=11f(11,998)=11。求所有 AAnn 位数,BBmm 位数所有 f(A,B)f(A,B) 的和。这里 A,BA,B 不能含前导零。

输入格式

本题单测试点含有多组测试样例。

第一行一个正整数表示 TT

接下来 TT 行,每行两个正整数表示 n,mn,m

输出格式

TT 行,每行一个非负整数,表示答案对 998244353998244353 取模的结果。

测试样例

样例输入 样例输出
31 11 22 3 4505715814905
见下发 easy/easy2.in 见下发 easy/easy2.ans

数据范围

下发 easy/easy2 强度有梯度。

测试点编号 TT\leq n,mn,m\leq
1 99 33
2 225225 1515
3 1010 10610^6
4 10510^5
5 10910^9

NOIP模拟赛(一)

Not Attended
Status
Done
Rule
OI
Problem
4
Start at
2023-10-23 8:00
End at
2023-10-23 12:00
Duration
4 hour(s)
Host
Partic.
14