You are not logged in. Please login at www.codechef.com to post your questions!

×

Runtime Error: Cleaning Up (CLEANUP)

Hi coders, I was trying my hands on clean up problem and getting runtime error. I am new to python and don't know much about the functioning of it. May be that's why I am getting a runtime error as problem is straight forward. Please can anybody help me regarding this. Here is my source code (or link: my solution):

def main():
   test = input()
   for i in range(test):
   jobs_count = raw_input().split(' ')
   finished_jobs = map(int, raw_input().split(' '))
   chef_jobs = []
   assistant_jobs = []
   count = 0
   for i in range(1,int(jobs_count[0])+1):
   if i not in finished_jobs:
      chef_jobs.append(i) if count%2 == 0 else assistant_jobs.append(i)
      count += 1
   for i in chef_jobs:
      print i,
   print ''
   for k in assistant_jobs:
      print k,
   print ''

if __name__ == '__main__':
   main()

asked 13 Jan '14, 19:57

ks2bmallik's gravatar image

2★ks2bmallik
854814
accept rate: 22%

edited 13 Jan '14, 20:00

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×545
×527
×231
×29

question asked: 13 Jan '14, 19:57

question was seen: 778 times

last updated: 13 Jan '14, 20:00