QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#167279 | #6407. Classical A+B Problem | realIyxiang# | Compile Error | / | / | C++14 | 695b | 2023-09-07 13:23:08 | 2023-09-07 13:23:08 |
Judging History
answer
T = int(input())
def check(x):
if x <= 0:
return False
s = str(x)
for i in s:
if i != s[0]:
return False
return True
def gener(x, len):
return int(str(x) * len)
while T > 0:
T -= 1
s = input()
lens = len(s)
x = int(s)
ok = 0
for i in range(1, 10):
if check(x - gener(i, lens)):
ok = True
t = gener(i, lens)
print(t, x - t)
break
if ok :
continue
for i in range(1, 10):
if check(x - gener(i, lens - 1)):
ok = True
t = gener(i, lens - 1)
print(t, x - t)
break
Details
answer.code:1:1: error: ‘T’ does not name a type 1 | T = int(input()) | ^