Yeah , the problem is solved , we don't have to write code for taking arguments or raw input , just follow the signature problem want us to keep and it works , Thnks a lot
On Sun, Jul 21, 2013 at 11:49 PM, driss kahfy <driss.ka...@gmail.com> wrote: > Use the editor of topcoder : write your code, save it, compile it and test > it. There's a button for each operation. > > > 2013/7/20 Carlos Guia <carlos.guia.v...@gmail.com> > >> Python is extremely new in topcoder (couple of weeks) so I have never >> used it. But in all other languages, you implement a method with a specific >> signature of a specific class and receive each test case as arguments. >> >> Carlos Guía >> >> >> On Sat, Jul 20, 2013 at 7:55 AM, wonjun <wonj...@gmail.com> wrote: >> >>> I normally go to the view section and copy everything. For instance if >>> it was the problem of SRM 584 Div 1 Egalitarianism, I would copy the >>> following: >>> >>> {"NYN", "YNY", "NYN"}, 10 20 Passed >>> >>> >>> {"NN", "NN"}, 1 -1 Passed >>> >>> etc and put it in a file, say EgalitarianismTest.txt >>> >>> Then I read the file, like the following: >>> f = open('EgalitarianismTest.txt','r') >>> a = f.read() >>> b = a.split('\n') >>> >>> for i in xrange(len(b)): if b[i] != '': >>> b[i] = b[i].split('\t') >>> etc etc. Note that now you need to replace '{' to '[' (similarly for the >>> other bracket) and call the eval function. >>> To check whether the answer is correct or not, simply call your >>> function and compare it with the correct value and take note of it. >>> If it is incorrect, take note of it in the other variable. >>> >>> >>> This method works okay for most of the problems, and most of the time I >>> found I had to wait for some time for it to check. >>> Hope it helped. >>> I think you could import sys (or the way you did) and read in the file - >>> but note that you need to do some amount of string manipulations such as >>> the ones done above. >>> >>> Hope it helped. >>> >>> >>> 2013/7/20 hk <studious.hem...@gmail.com> >>> >>>> I am using python to solve problems in topcoder , but if i take input >>>> as :: >>>> value=raw_input('input:') >>>> but it gives EOFerror >>>> >>>> -- >>>> 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 post to this group, send email to google-code@googlegroups.com. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/google-code/d87fa861-7739-4f96-a222-58f76c678e22%40googlegroups.com >>>> . >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>>> >>>> >>> -- >>> 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 post to this group, send email to google-code@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/google-code/CAA0%2BsYvt9Zt8Wbc1pxudyYc6SaZCzp2GA7gKttrcyMqPKUpvoA%40mail.gmail.com >>> . >>> >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> -- >> 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 post to this group, send email to google-code@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/google-code/CANxkOGbVKs7bB1%3DAmVtcUwp3ao%3DPrYKrrmkQ-GV%2BbKbjJRFYBw%40mail.gmail.com >> . >> >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- > 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 post to this group, send email to google-code@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-code/CAK19nusJqJG0DOveM%3DPrmFTYPTrRS%3D4AZdg%2B0ahyt%3D6PB0VkFA%40mail.gmail.com > . > > For more options, visit https://groups.google.com/groups/opt_out. > > > -- 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 post to this group, send email to google-code@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/CAL3o0yyaJPdw%2B77Y%3DVyz7AMdFzYNZdpbxaRGubjrYD5%3DYTFjtw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.