python暴力算法,不用数据字符和数字的转换
shu=[6,2,5,5,4,5,6,3,7,6]
n = int(input())
n = n-4
def hc(m):
s=0
if m==0:
return 6
while m>0:
g= m%10
s=s+shu[g]
m=m//10
return s
sss=0
for i in range(0,999):
for j in range(0,999):
k=i+j
if hc(k)+hc(i)+hc(j)==n:
sss=sss+1
print(sss)