#P10372. [AHOI2024 初中组 / 科大国创杯初中组 2024] 家庭作业
[AHOI2024 初中组 / 科大国创杯初中组 2024] 家庭作业
Background
The testdata for this problem is not official.
Official testdata (that can be uploaded here) is being collected.
Official testdata (that cannot be uploaded here): https://www.luogu.com.cn/training/499869
Unofficial testdata download: https://scg3.piaoztsdy.cn/training/69bce235a7cf509104565c83
Problem Description
Xiao Keke has calculation problems of the form . You need to check whether she got each problem correct.
Input Format
The first line contains a positive integer .
The next lines each contain an expression in the form a+b=c.
It is guaranteed that the input format is correct, the numbers have no leading zeros, and there are no spaces between numbers and operators.
See the sample for the exact format.
Output Format
Output lines. If the -th expression is correct, output Right! on the -th line; otherwise, output Wrong! on the -th line.
5
1+1=2
1+2=2
15+66=81
5+37=40
99+99=99
Right!
Wrong!
Right!
Wrong!
Wrong!
Hint
Sample 1 Explanation
Note from the problem porter: To avoid insulting everyone’s intelligence, the sample will not be explained. (There is no sample explanation in the setter’s PDF either.)
Constraints
For of the testdata, and .
For of the testdata, .
For of the testdata, and .
Translated by ChatGPT 5