题目链接:

  http://codeforces.com/problemset/problem/705/A

题目大意:

  给一个数N(N<=100),N=1时输出"I hate it",N=2输出"I hate that I love it",N=3输出"I hate that I love that I hate it"以此类推迭代下去。

题目思路:

  【模拟】

  暴力模拟即可,签到题。

 //
//by coolxxx
//#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<string>
#include<iomanip>
#include<map>
#include<memory.h>
#include<time.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
//#include<stdbool.h>
#include<math.h>
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#define abs(a) ((a)>0?(a):(-(a)))
#define lowbit(a) (a&(-a))
#define sqr(a) ((a)*(a))
#define swap(a,b) ((a)^=(b),(b)^=(a),(a)^=(b))
#define mem(a,b) memset(a,b,sizeof(a))
#define eps (1e-8)
#define J 10
#define mod 1000000007
#define MAX 0x7f7f7f7f
#define PI 3.14159265358979323
#define N 104
using namespace std;
typedef long long LL;
int cas,cass;
int n,m,lll,ans;
string ss;
int main()
{
#ifndef ONLINE_JUDGE
// freopen("1.txt","r",stdin);
// freopen("2.txt","w",stdout);
#endif
int i,j,k;
// for(scanf("%d",&cas);cas;cas--)
// for(scanf("%d",&cas),cass=1;cass<=cas;cass++)
// while(~scanf("%s",s+1))
while(~scanf("%d",&n))
{
if(n==){puts("I hate it");continue;}
ss="I hate ";
for(i=;i<=n;i++)
if(i&)ss+="that I hate ";
else ss+="that I love ";
ss+="it";
cout<<ss<<endl;
}
return ;
}
/*
// //
*/

【模拟】Codeforces 705A Hulk的更多相关文章

  1. CodeForces 705A Hulk (水题)

    题意:输入一个 n,让你输出一行字符串. 析:很水题,只要判定奇偶性,输出就好. 代码如下: #pragma comment(linker, "/STACK:1024000000,10240 ...

  2. CodeForces 705A Hulk

    水题. #pragma comment(linker, "/STACK:1024000000,1024000000") #include<cstdio> #includ ...

  3. codeforces 705A:Hulk

    Description Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely ta ...

  4. 贪心+模拟 Codeforces Round #288 (Div. 2) C. Anya and Ghosts

    题目传送门 /* 贪心 + 模拟:首先,如果蜡烛的燃烧时间小于最少需要点燃的蜡烛数一定是-1(蜡烛是1秒点一支), num[g[i]]记录每个鬼访问时已点燃的蜡烛数,若不够,tmp为还需要的蜡烛数, ...

  5. 模拟 Codeforces Round #203 (Div. 2) C. Bombs

    题目地址:http://codeforces.com/problemset/problem/350/C /* 题意:机器人上下左右走路,把其他的机器人都干掉要几步,好吧我其实没读懂题目, 看着样例猜出 ...

  6. 模拟 Codeforces Round #249 (Div. 2) C. Cardiogram

    题目地址:http://codeforces.com/contest/435/problem/C /* 题意:给一组公式,一组数据,计算得到一系列的坐标点,画出折线图:) 模拟题:蛮恶心的,不过也简单 ...

  7. 模拟 Codeforces Round #297 (Div. 2) A. Vitaliy and Pie

    题目传送门 /* 模拟:这就是一道模拟水题,看到标签是贪心,还以为错了呢 题目倒是很长:) */ #include <cstdio> #include <algorithm> ...

  8. queue+模拟 Codeforces Round #304 (Div. 2) C. Soldier and Cards

    题目传送门 /* 题意:两堆牌,每次拿出上面的牌做比较,大的一方收走两张牌,直到一方没有牌 queue容器:模拟上述过程,当次数达到最大值时判断为-1 */ #include <cstdio&g ...

  9. 模拟 Codeforces Round #288 (Div. 2) A. Pasha and Pixels

    题目传送门 /* 模拟水题:给定n*m的空白方格,k次涂色,将(x,y)处的涂成黑色,判断第几次能形成2*2的黑色方格,若不能,输出0 很挫的判断四个方向是否OK */ #include <cs ...

随机推荐

  1. Java使用poi对Execl简单操作_总结

    poi是Apache组织给开发者提供一套操作office(Execl,Word,PowerPoint)等Java API,开发者通过Poi API可以快速的操作office办公软件,以上3篇博文只是一 ...

  2. Mongodb 启动时 lock文件访问没有权限处理

    mongodb 第二次启动时候异常信息: lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instance ...

  3. Tomcat下work文件夹的作用

    1.打补丁,重启tomcat时要删除work文件夹,有缓存. 2.work目录只是tomcat的工作目录,也就是tomcat把jsp转换为class文件的工作目录 jsp,tomcat的工作原理: 当 ...

  4. NSDate,NSCalendar,NSTimer,NSTimeZone

      NSDate存储的是世界标准时(UTC),输出时需要根据时区转换为本地时间 Dates NSDate类提供了创建date,比较date以及计算两个date之间间隔的功能.Date对象是不可改变的. ...

  5. Uploadify 笔记分享 -- 2014年10月18日

    最近要做一个项目,有个部分需要用到Uploadify,以前用过,但不是很懂,找了无数遍的中文文档,发现好多都是以前的,都不能用,一时间索性自己写了个笔记,随用随查 <form> <i ...

  6. Centos7搭建php+mysql环境(整理篇)

    终于将mysql+php环境搭建成功,将之前的整理一下,环境:centos7,本机IP:192.168.1.24,数据库用户名及密码都设为root,测试文件路径:/var/www/html 1.取消c ...

  7. paramiko SSH 模块简单应用。

    目的:需要ssh链接到Linux主机,执行telnet 命令,抓回显匹配制定内容. ssh --->执行telnet到本地端口--->执行类似 ls 的命令.匹配命令执行后的特定回显字段. ...

  8. Java实现Linux下服务器程序的双守护进程

    作者:Vinkn 来自http://www.cnblogs.com/Vinkn/ 一.简介 现在的服务器端程序很多都是基于Java开发,针对于Java开发的Socket程序,这样的服务器端上线后出现问 ...

  9. CSS3的过渡效果(transition)与动画(animation)

    1.Transition Transition是一种直观上的效果,让DOM元素的某个属性在固定时间内从一旧值到一新值.目前Firefox.Opera.Safari和Chrome都支持transitio ...

  10. 小记搭建WAPM运行ThinkPHP时所需要的配置

    最近因为项目而接触到了Thinkphp,正在上手中.但昨天遇到几个问题,一下子牵连出之前搭建WAPM(windows+apache+PHP+MySQL)遗留的配置问题. aphache\conf目录下 ...