About CF
Topic Link: 705A
Surface:
A. hulktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
Dr. Bruce Banner hates his enemies (like others don ' t). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked your to help him to express his feelings.
Hulk likes the Inception so much, and as that he feelings is complicated. They hasn layers. The first layer is hate, second one are love, third one are hate and so on ...
For example if n-=?1, then he feeling is "I hate it" or ifn? =?2 It ' s "I Hate that I love it", and ifn? =?3 It's"I hate that I love the I hate it"and so on.
Please help Dr. Banner.
Input
The only line of the input contains a single integer n (1?≤? N? ≤?100)-the number of layers of love and hate.
Output
Print Dr.banner ' s feeling in one line.
Examplesinput
1
Output
I Hate it
Input
2
Output
I hate that I love it
Input
3
Output
I hate that I love that I hate it
Test instructions
The same example of odd even output can be.
Solving:
Note that the last one is it, in the middle is that.
Code:
#include <iostream> #include <cstdio>using namespace Std;int main () {int n;cin>>n;for (int i=1;i<n; i++) { if (i%2) cout<< "I hate that"; else cout<< "I love that";} if (n%2) cout<< "I hate it"; else cout<< "I love it"; Cout<<endl;return 0;}
"Play CF, learn algorithm--one star" Codeforces 705A Hulk