Description
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 has n 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 if n = 2 It's "I hate that I lo ve it ", and if n = 3 It's"I hate that I love this 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 L Ove and hate.
Output
Print Dr.banner ' s feeling in one line.
Examples
input
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: Very simple topic, singular output what, even output what
Solution: Simulation
#include <bits/stdc++.h>using namespace Std;int n;int main () { cin>>n; for (int i=1;i<=n;i++) { int pos=i%2; if (pos==1) { cout<< "I hate"; } else if (pos==0) { cout<< "I Love"; } if (i!=n) { cout<< "that"; } } cout<< "It" <<endl; return 0;}
Codeforces Round #366 (Div. 2) A