Re: Knapsack Problem Without Value

2013-12-13 Thread geezle86
On Friday, December 13, 2013 9:08:56 AM UTC+7, geez...@gmail.com wrote: Hi, I wanna ask about Knapsack. I do understand what Knapsack is about. But this one i faced is a different problem. There is no value. I mean, it's like this, for example. I have 4 beams [X0, X1, X2, X3].

Knapsack Problem Without Value

2013-12-12 Thread geezle86
Hi, I wanna ask about Knapsack. I do understand what Knapsack is about. But this one i faced is a different problem. There is no value. I mean, it's like this, for example. I have 4 beams [X0, X1, X2, X3]. Each 1, 2, 2, 3 cm long. I want to make a new 6 cm long connected-beam from these 4

Input without line break, is it possible?

2013-12-04 Thread geezle86
The source code: for i in range(8): n = input() When we run it, consider the numbers below is the user input, 1 2 3 4 5 6 (and so forth) my question, can i make it in just a single line like, 1 2 3 4 5 6 (and so forth) Can I? -- https://mail.python.org/mailman/listinfo/python-list

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 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