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
|
|||||
2010-09-01 16:31:32 Piotr Fusik
Perl 6 won't work in 1 second. :) |
|||||
2010-09-01 13:22:55 :(){ :|: & };:
Perl 6 is available now. |
|||||
2010-08-31 09:01:21 Piotr KÄ…kol
Option "Include new languages" doesn't work, so all problem-setters have to add new languages by hand and even check if there are any new langs. I'll ask Debenjan to add Perl 6, so be patient. :-) |
|||||
2010-08-31 08:48:13 Piotr Fusik
Why not Perl 6 ? |