codeforces-366#--A

来源:互联网 发布:itunes软件下载到哪里 编辑:程序博客网 时间:2024/04/30 06:17

水题不多说。格式输出。。

#include <iostream>
#include <stdio.h>
using namespace std;


int main()
{
    int n;
    cin>>n;
    if(n!=1)
    printf("I hate that");
    else
    printf("I hate it");
    for(int i=2;i<=n;i++)
    {
        if(i!=n)
        {
        if(i%2==0)
        printf(" I love that");
        else
        printf(" I hate that");
        }
        else
        {
        if(i%2==0)
        printf(" I love it");
        else
        printf(" I hate it");
        }
    }
    printf("\n");
    return 0;
}

0 0
原创粉丝点击