The Python3 version used in codejam is 3.5, which does not support 
f-strings. Using `str.format()` or other alternatives.

On Monday, April 6, 2020 at 5:51:31 PM UTC-7, Mayuresh Anand wrote:
>
> def schedule(jobs,n):
>     jobAssign = [0]*n
>     statusJ = "INACTIVE"
>     statusC = "INACTIVE"
>     jobJ = [0,0,0]
>     jobC = [0,0,0]
>     for i in range(0,n):
>         newJob = jobs[i]
>         if jobC[2] <= newJob[1]:
>             jobC = newJob
>             jobAssign[newJob[0]-1] = "C"
>            
>         elif jobJ[2]<= newJob[1]:
>             jobJ = newJob
>             jobAssign[newJob[0]-1] = "J"
>         else:
>             return "IMPOSSIBLE"
>     assigned = ""
>     for x in jobAssign:
>         assigned += x
>     return assigned
>
> def main()
>     t = int(input())
>     for i in range(0,t):
>         n = int(input())
>         jobs = []
>         for j in range(0,n):
>             jobs.append([j+1]+[int(s) for s in input().split(" ")])
>         sortedJobs =  sorted(jobs,key=lambda l:l[1])
>         print(f"Case #{i+1}: {schedule(sortedJobs,n)}")
>     
>
>

-- 
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/80076cc6-494a-4094-8f3e-ed75ef177151%40googlegroups.com.

Reply via email to