University of Toronto ACM-ICPC Tryouts 2013
B: A Careful Reply
Weird! A week into school, Bob has received T (1 ≤ T ≤ 100) texts in a row from some girl he's never seen before, Alice. Obviously, he's promptly checked her out on Facebook, and likes what he sees! Now, the hard part - he needs to craft some appropriate replies.
Everyone knows that the affection conveyed in a text is measured by the number of hearts it contains - in other words, the number of times it contains the string "<3". Bob certainly wants to reciprocate Alice's seemingly romantic feelings, but doesn't want to come off as overly desperate. He's decided that his response to each text should contain exactly one more heart than the received text. In fact, he doesn't really want to convey any other information, so his reply will consist of only this number of instances of the string "<3", separated by single spaces (and with no leading or trailing spaces).
After waiting the appropriate amount of time (he wouldn't want to reply too quickly, after all), it's time to make a good impression on Alice - Bob wants to determine the perfect response to each of the T texts!
Input
Line 1: 1 integer, T
For each text:
Line 1: 1 string of at most 1000 characters, the received text
Output
For each text, output 1 string of characters, the reply to the text.
Sample Input
4 hey handsome <3 :) u busy tonite? <3 how about sum dinner? <<33<3 luv u plz say yes <\3
Sample Output
<3 <3 <3 <3 <3 <3 <3 <3
Explanation of Sample
The received texts contain 1, 0, 3, and 0 hearts, respectively. Therefore, their corresponding replies should consist of 2, 1, 4, and 1 hearts, respectively.
All Submissions
Best Solutions
Point Value: 5
Time Limit: 2.00s
Memory Limit: 64M
Added: Jul 08, 2014
Author: SourSpinach
Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3
Comments (Search)
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
[...]