ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1206. Sum of Digits of the Sum of Numbers

accepted
Posted by Mikhail 11 May 2018 00:55
ans1 = 0
ans2 = 0
for i in range(1, 10) :
    for j  in range(1, 10) :
        if i + j < 10 :
            ans1 += 1
for i in range(0, 10) :
    for j  in range(0, 10) :
        if i + j < 10 :
            ans2 += 1

n = int(input())

for i in range (1, n) :
    ans1 *= ans2

print(ans1)
Re: accepted
Posted by Artem 16 Jun 2018 15:43
How this work?