diff --git "a/\354\235\264\354\236\254\354\235\270/\355\224\204\353\241\234\352\267\270\353\236\230\353\250\270\354\212\244/7\354\243\274\354\260\250/\353\247\210\353\262\225\354\235\230\354\227\230\353\246\254\353\262\240\354\235\264\355\204\260.py" "b/\354\235\264\354\236\254\354\235\270/\355\224\204\353\241\234\352\267\270\353\236\230\353\250\270\354\212\244/7\354\243\274\354\260\250/\353\247\210\353\262\225\354\235\230\354\227\230\353\246\254\353\262\240\354\235\264\355\204\260.py" new file mode 100644 index 0000000..356fb98 --- /dev/null +++ "b/\354\235\264\354\236\254\354\235\270/\355\224\204\353\241\234\352\267\270\353\236\230\353\250\270\354\212\244/7\354\243\274\354\260\250/\353\247\210\353\262\225\354\235\230\354\227\230\353\246\254\353\262\240\354\235\264\355\204\260.py" @@ -0,0 +1,14 @@ +def solution(storey): + result = 0 + while storey > 0: + num = storey % 10 + next_num = (storey // 10) % 10 + + + if num > 5 or (num == 5 and next_num >= 5): + result += 10 - num + storey = (storey // 10) + 1 + else: + result += num + storey //= 10 + return result \ No newline at end of file