Friday, March 27, 2020

UVa - 12555 - Baby Me

Link to pdf version on UVa OJ

This is a very easy problem. I just want to write about simple points. First of all you can ignore Chinese characters, right? In each line there are either one integer or two integers. Look for them,
tokenize each line and take the first and second number as integers.
The rest is straightforward.
And also another point, even if the problem is super easy and the statement is short don't skim the problem statement, read it carefully. I didn't read input format correctly and I thought there could be many more different kind of inputs, though there are only two type of inputs.

My code on github


No comments:

Post a Comment

USACO - Prime Palindromes

I just skimmed the problem statement and panicked of the high boundary of the input, but something inside told me don't worry everyth...