Submit | All submissions | Best solutions | Back to list |
NEXTODD - The next odd number |
Given an integer 1 <= N <= 10000,you have to print the next odd number.
Score is the length of your source.
Input
The input file consists of series of numbers one in each line.The input is terminated by EOF.
Output
The next odd number.
Example
Input:
5
2
6
17
Output:
7
3
7
19
PS:Take care about your fingers, do not use more than 100 bytes of code.
Added by: | :(){ :|: & };: |
Date: | 2010-08-25 |
Time limit: | 1s |
Source limit: | 100B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: NODEJS OBJC SCM qobi VB.NET |
Resource: | From a shortening contest. |
hide comments
|
|||||
2014-08-07 16:51:15 ওয়াসী (Wasi)
ow yeah! my first GO golfing (99bytes :P) Edit: Wow! I'm feeling like an alien from outer space. Its been a while i have not checked the ranks. But, now I see So many remarkable changes that I would love to admire :D Mitch Congrats for taking lead from the mighty jander (leading with 100 solve) Also, @linghui liu @dominique you both are so inspiring! Keep on going :D (both leaped over me probably a long time ago but liu is now at 3rd with 37 max scores! dom is now at top ten :D) The most fabulous change is AWK is now at 2nd position It was at 14 (last time i checked the ranks :P) Last edit: 2014-08-07 18:00:27 |
|||||
2014-07-16 20:10:18 Hallvard Norheim Bø
@avinish chandra: I found the 10 byte AWK solution by reading the Linux man page for AWK and trying out ideas on ideone.com. |
|||||
2014-07-13 15:32:03 black MaMbA
@debanjan - please help with the last query |
|||||
2014-07-12 12:14:30 black MaMbA
could anyone with 10 characters hint me how can we reach there |
|||||
2012-02-25 20:19:14 Piotr KÄ…kol
Only writing to the author may change something. But this task is also in main SPOJ so I don't know if he increase the limit. |
|||||
2012-02-25 14:09:31 Hallvard Norheim Bø
This problem is unfortunate not solvable in Java due to the 100 bytes source limit :( My best Java solution is currently 150 bytes, with no chance of ever reaching 100. |
|||||
2011-04-20 21:14:22 numerix
Sometimes ideone doesn't help in case of Python NZEC as Python 2.6 is used there instead of Python 2.5 and there are some builtin-functions, that are new in Python 2.6, e.g. bin() and permutations() from itertools-module ... |
|||||
2011-04-20 17:47:21 Piotr KÄ…kol
I can't because all p-setters would have to change their judges in all the tasks from SHORTEN. There isn't such option like this in contest editboard. So even if it's possible, I think it's not very usefull as You can check Your program for some tests on ideone (which works almost the same as SPOJ) and if You didn't manage to find the cause of NZEC You can always ask in comments. (for example with this bin function You might have used ideone) |
|||||
2011-04-20 05:44:07 512_I
@Piotr: why dont u give us option to see our run time error(NZEC) ? |
|||||
2010-09-03 14:34:37 :(){ :|: & };:
@Piotr Fusik :I have increased the time limit. |