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 VB.NET |
Resource: | From a shortening contest. |
hide comments
|
|||||
2014-03-16 12:16:28 zai zai
i forgot "\n" :) |
|||||
2013-08-07 10:23:13 ওয়াসী (Wasi)
Got it. 10B in 1st attempt! :P Last edit: 2013-08-21 14:50:48 |
|||||
2013-08-07 10:00:16 Mostafa 36a2
@ওয়াসী (Wasi) :Come on and bring your awk:) |
|||||
2013-06-15 19:36:59 ওয়াসী (Wasi)
stuck at 33 chars in py2 :( wish i could cut a byte off! EDIT: 27 chars finally! :D Last edit: 2013-06-16 09:11:30 |
|||||
2013-06-15 19:34:05 yousef hadder
Solution is sooooooo easy and stupid. For the memory limit,just don't leave any extra spaces and lines in your code. |
|||||
2013-06-15 16:47:01 Bara farouk abdelsalam
isak your answer is : while(!cin.eof(){ . . . . . . } |
|||||
2013-02-26 13:16:03 Moudud
memory limit too long.but it is shortest to me |
|||||
2013-01-30 20:54:38 Vikas Gupta
TLE!!!!!!!!! |
|||||
2012-01-12 07:44:41 Santiago Palacio
@isak while(cin>>n){...} |