"Play CF, learn algorithm--one star" Codeforces 705A Hulk

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.