We're a place where coders share, stay up-to-date and grow their careers.
n_cases = int(input()) for i in range(1, n_cases + 1): check_amount = int(input()) unfound = True fours = [int(i) for i in str(check_amount)] others = ["1" if n == 4 else "0" for n in fours] n = int(''.join(others)) print("Case #{}: {} {}".format(i, n, check_amount - n))
Discussion on: Coding Puzzles: Week of 4/8
Replies for: Friday (CodeJam): Foregone Solution codingcompetitions.withgoogle.com/...