Label: Not On Label (Nikita The Spooky And A Circus Of Men Self-released) - none • Format: 6x, File MP3 320 kbps • Country: New Zealand • Genre: Jazz, Folk, World, & Country • Style: Folk
More precisely Stop processing input after reading in the number All numbers at input are integers of one or two digits. I submitted the code for the above problem on spoj and it says wrong answer even when writing the correct output. Deep Purple - Croydon Tapes numbers at input Assuming SPOJ is like other online judges, you need to work on a line basis.
If you just output undelimited integers, how can the judge tell if is 111111 or ? This is meant to just be an introduction to SPOJ's system. You're overcomplicating it a bit. It's as simple as:. This is more of a nitpick, but the while Life could be created in a better fashion instead of break ing. Home Questions Tags Users Unanswered. Life, the Universe, and Everything [closed] Ask Question. Asked 6 years ago. Active 3 years, 1 month ago. Viewed 17k times.
However, both of the above solutions don't work on spoj. Coder Unknown Coder Unknown 73 1 1 gold badge 2 2 silver badges 5 5 bronze badges. I suspect that SPOJ is like most judges and likes line breaks between outputs. So it does not belong here. For simple IO like this though, that's likely overkill. In more complicated cases though, you might need to be aware of how many tokens scanf read.
The instructions never specified that a small number if 2 digits. That's a dangerous assumption. It likely meant small to mean "fits in an int. Corbin Corbin It returns an character for the next character in the input buffer. In other words "42" is interpreted as the character "4" and the character "2". You don't check if the input number is an int. Code challenge websites typically do not have user interaction of any kind.
They tend to be extremely picky about having the exact same output. Keep in mind I didn't review the program so it would pass 444 - Various - Ultimate Bonehead!
Vol. One spoj code challenge. A holiday carol for coders. Featured on Meta. Update: an agreement with Monica Cellio. Related 5. Hot Network Questions.
Eye Witness - Kaleidoscope - From Home To Home, Nothing Can Come Between Us - Sade - Stronger Than Pride, Größer Als Wir Beide - Heinz Rudolf Kunze - Größer Als Wir Beide, Faute De Frappe - Olive* - Olive, Allegretto - Beethoven* - Wolf Rottmann, Josef Anduli, Romana Chamber Orchestra - Piano Sonatas / Pi