Codeforces Round #366 (Div. 2)
来源:互联网 发布:mac最好的压缩软件 编辑:程序博客网 时间:2024/05/04 15:48
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 you to help him to express his feelings.
Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on...
For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on.
Please help Dr. Banner.
The only line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of layers of love and hate.
Print Dr.Banner's feeling in one line.
1
I hate it
2
I hate that I love it
3
I hate that I love that I hate it
#include<cstdio> using namespace std; int main(){ int n,i; scanf ("%d",&n); for (i=1;i<=n;i++){ printf ("I "); if (i&1) printf ("hate "); else printf ("love "); if (i==n) continue; printf ("that "); } printf ("it "); return 0; }
- Codeforces Round #366 (Div. 2)
- Codeforces Round #366 (Div. 2)
- Codeforces Round #366 (Div. 2)
- Codeforces Round #366 (Div. 2)
- Codeforces Round #366 (Div. 2)
- Codeforces Round #366 (Div. 2)
- Codeforces Round #366 (Div. 2)
- Codeforces Round #366 (Div. 2)
- 【codeforces】Codeforces Round #366 (Div. 2)
- Codeforces Round #366 (Div. 2)题解报告
- Codeforces Round #366 (Div. 2) 题解
- Codeforces Round #366 (Div. 2) C. Thor
- Codeforces Round #366 (Div. 2) C. Thor
- Codeforces Round #366 (Div. 2) C list
- Codeforces Round #366 (Div. 2) Thor
- Codeforces Round #366 (Div. 2)C
- Codeforces Round #366 (Div. 2)B
- Codeforces Round #366 (Div. 2) A. Hulk
- Gson解析
- Cent os 6.3上安装rlwrap
- [BZOJ4565][Haoi2016]字符合并(状压dp)
- gradle下载更新依赖库失败的解决办法 - 依赖库下载加速1000%
- UpdateDriverForPlugAndPlayDevices在64位操作系统执行失败解决方案
- Codeforces Round #366 (Div. 2)
- pyqt4文档阅读(4):QPushButton
- Unity-Android通信:AndroidJava 使用Unity c#编写Android程序调用任何方法
- jquery ajax 地级三级菜单
- 九九乘法表
- 工作笔记-字段处理部分
- UGUI - 制作listview
- C++中构造函数初始化的方法以及主要区别
- shell 脚本简单总结