Head vs breakz
[code] - 백준 함수 15596,4673,1065번 python 본문
15596
#함수
#15596
def solve(a):
return sum(a)
4673
#4673
a = [1 + i for i in range(10000)]
for i in range(10000) :
b = list(str(i))
c = 0
for j in range(len(b)):
c += int(b[j])
d = c +i
if d in a :
a.remove(d)
for i in range(len(a)):
print(a[i])
1065
#1065
a = int(input())
b = [1 + i for i in range(a)]
for j in range(len(b)+1):
if j < 100 :
pass
elif j//100-(j%100)//10 != (j%100)//10-(j%100)%10 :
b.remove(j)
print(len(b))
'Head > Code' 카테고리의 다른 글
[code] - 백준 수학 1193,2869,10250,2775,1712,2839,2292 python (0) | 2020.04.08 |
---|---|
[code] - 백준 문자열 11654,11720,10809,2675,1157,1152,2908,5622,2941,1316번 python (0) | 2020.04.04 |
[code] - 백준 1차열배열 10818,2582,2577,3053,1546,8958,4344 python (0) | 2020.04.03 |
[code] - 백준 실습1 10039,5543,10817,2523,2446,10996, python (0) | 2020.03.19 |
[code] - 백준 while문 10952,10951,1110 python (0) | 2020.03.18 |
Comments