*Here's my code:*
import re
import random

def missing_number(k, N):
    if not (1 < int(N) < 10**100) or '4' not in N:
        print()
        return
    pos = [i.start(0) for i in re.finditer('4', N)]
    inter_list = [i for i in N]
    for i in pos:
        inter_list[i] = str(random.randint(1, 3))
    val = int(''.join(inter_list))
    diff = int(N) - val
    print(f'Case #{k+1}:', diff, val)

t = int(input())
l = [input() for i in range(t)]
    
for t, N in enumerate(l):
    missing_number(t, N)
*Output* (On my system)
3
414
12345678
123131231231312313
Case #1: 203 211
Case #2: 30000 12315678


"If there are multiple solutions, you may output any one of them"
>

The answers are correct right....?

Then why do I get a RE? How should I solve it?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-code+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/9da2ea4f-05b1-4ccb-9310-e08bf6f46697%40googlegroups.com.

Reply via email to