The input and output is as wanted, but why error?

2013-12-03 Thread geezle86
I am trying to solve this problem: http://codeforces.com/problemset/problem/71/A The input and output is as wanted, but my answer keep rejected, here is my source code http://txt.do/1smv Please, I need help. -- https://mail.python.org/mailman/listinfo/python-list

Re: The input and output is as wanted, but why error?

2013-12-03 Thread John Gordon
In 387f5b5f-faf1-4715-8d49-e366be53f...@googlegroups.com geezl...@gmail.com writes: I am trying to solve this problem: http://codeforces.com/problemset/problem/71/A The input and output is as wanted, but my answer keep rejected, here is my source code http://txt.do/1smv Please, I need

Re: The input and output is as wanted, but why error?

2013-12-03 Thread Neil Cerutti
On 2013-12-03, geezl...@gmail.com geezl...@gmail.com wrote: I am trying to solve this problem: http://codeforces.com/problemset/problem/71/A Please post your code in and the problem in your message. Here it is for those reading along: A. Way Too Long Words Sometimes some words like

Re: The input and output is as wanted, but why error?

2013-12-03 Thread geezle86
x = input() if x.isdigit() == False: i = len(x) j = i - 1 k = i - 2 xList = list(x) if len(xList) 4: print(xList[0], int(k), xList[j], sep='', end='') else: print(x) else: SystemExit I just dont understand what is wrong,

Re: The input and output is as wanted, but why error?

2013-12-03 Thread geezle86
x = input() if x.isdigit() == False: i = len(x) j = i - 1 k = i - 2 xList = list(x) if len(xList) 4: print(xList[0], int(k), xList[j], sep='', end='') else: print(x) else: SystemExit I just dont understand what is wrong,

Re: The input and output is as wanted, but why error?

2013-12-03 Thread geezle86
Well, i've changed the if len(xList).. from 4 to 10 But still, it is not accepted :( -- https://mail.python.org/mailman/listinfo/python-list

Re: The input and output is as wanted, but why error?

2013-12-03 Thread Mark Lawrence
On 03/12/2013 16:38, geezl...@gmail.com wrote: Well, i've changed the if len(xList).. from 4 to 10 But still, it is not accepted :( Where is your code that meets these requirements? Input The first line contains an integer n (1?=?n?=?100). Each of the following n lines contains one word.

Re: The input and output is as wanted, but why error?

2013-12-03 Thread Neil Cerutti
On 2013-12-03, geezl...@gmail.com geezl...@gmail.com wrote: x = input() Your first problem is that input() returns text only up the a newline, and then stops. So you are reading the initial number line, but never reading the rest of the lines. -- Neil Cerutti --

Re: The input and output is as wanted, but why error?

2013-12-03 Thread rusi
On Tuesday, December 3, 2013 9:18:43 PM UTC+5:30, geez...@gmail.com wrote: I am trying to solve this problem: http://codeforces.com/problemset/problem/71/A The input and output is as wanted, but my answer keep rejected, here is my source code http://txt.do/1smv Please, I need help. I

Re: The input and output is as wanted, but why error?

2013-12-03 Thread Dave Angel
On Tue, 3 Dec 2013 08:35:20 -0800 (PST), geezl...@gmail.com wrote: really, i dont know why.. :( How about because you do a system exit on the first line of their input? The one that's all digits. And even if you get past that, you only process one of their words. -- DaveA --

Re: The input and output is as wanted, but why error?

2013-12-03 Thread Denis McMahon
On Tue, 03 Dec 2013 07:48:43 -0800, geezle86 wrote: I am trying to solve this problem: http://codeforces.com/problemset/problem/71/A That's not a problem, it's a url. The input and output is as wanted, but my answer keep rejected, here is my source code http://txt.do/1smv That's not