The system supports Python 3.5. You use f-strings that require Python 3.6
or later.
On Thursday, April 2, 2020 at 12:00:01 AM UTC-4, joe733 wrote:
>
> *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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-code/deb3ba92-fc7f-4e0c-9f08-99b0a116fa67%40googlegroups.com.