Submit | All submissions | Best solutions | Back to list |
WORDNUM2 - Word or number (easiest 2) |
We use alphabetic characters from the Romans for words, and numerals from the Arabs for numbers. Can you write a program to tell the difference?
Input
Input will be a sequence of either alphabetic characters, or a sequence of numeric characters (no decimals).
Output
Output "word" (no quotes) if the characters are alphabetic. Output "number" (no quotes) if the characters are numeric. All character will be one or the other.
Example
Input: ACM Output: word
Input: 012 Output: number
Added by: | Paul Draper |
Date: | 2012-09-26 |
Time limit: | 0.705s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
hide comments
2013-11-10 10:36:15 Fandy Ahmad
how do the output if i take input ASD123 ? i have submitted but still WA :( |
|
2013-05-21 13:09:28 Nick
thank you, I can learn string more.. |
|
2012-09-27 06:49:34 avinash choudhary
@Andrés: Did not work.. Worked by removing public keyword from class :) Last edit: 2012-10-18 11:46:43 |
|
2012-09-26 13:37:23 Andres R. Arrieche S. [UCLA-ve]
@avinash choudhary Try with class name "Main" |
|
2012-09-26 11:48:44 avinash choudhary
Since this is my first java upload..can someone plz tell me wat does this error want me to do... "Main.java:4: class WordOrNumber is public, should be declared in a file named WordOrNumber.java public class WordOrNumber { ^ 1 error " I did upload the file of that name..still the same error :( Last edit: 2012-09-26 11:54:51 |
|
2012-09-26 08:18:32 ken_taiken
Tutorial ! Last edit: 2012-09-26 08:22:07 |
|
2012-09-26 05:32:00 (Tjandra Satria Gunawan)(曾毅昆)
Definitely tutorial! even for BF programmer... |