Skip to content

Commit 7bc11bf

Browse files
authored
Update solution.hide.py
1 parent 2275edf commit 7bc11bf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Your code here
22
def computed_value(param):
3-
n1 = int( "%s" % param )
4-
n2 = int( "%s%s" % (param,param) )
5-
n3 = int( "%s%s%s" % (param,param,param) )
6-
n4 = int( "%s%s%s%s" % (param,param,param,param) )
7-
return (n1+n2+n3+n4)
3+
result = 0
4+
for i in range(1, 5):
5+
concatenated_number = int(str(param) * i)
6+
result += concatenated_number
7+
return result
88

99
print(computed_value(9))

0 commit comments

Comments
 (0)