Python3 60分求改

B2068 统计满足条件的 4 位数

PLDD @ 2024-01-06 09:51:59

a = int(input())

b = list(map(str,input().split(' ')))

f = int(0)

for i in range(a):

c = 0
m = b[i]
l = int(m[3])
for j in range(3):
    c += int(m[j])
if l - c >= 0:
    f += 1

print(f)


by PLDD @ 2024-01-06 09:53:01

结果是对的,测试点不过,求调


by Apress @ 2024-01-06 10:26:43

@PLDD

大于等于号改成大于就好了

不谢。


|