CodeForces 705A Hulk
水题。
#pragma comment(linker, "/STACK:1024000000,1024000000")
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<iostream>
using namespace std;
typedef long long LL;
const double pi=acos(-1.0),eps=1e-;
void File()
{
freopen("D:\\in.txt","r",stdin);
freopen("D:\\out.txt","w",stdout);
}
inline int read()
{
char c = getchar(); while(!isdigit(c)) c = getchar();
int x = ;
while(isdigit(c)) { x = x * + c - ''; c = getchar(); }
return x;
} int main()
{
int n;scanf("%d",&n);
if(n==) { printf("I hate it\n"); return ; }
if(n==) { printf("I hate that I love it\n"); return ; }
for(int i=;i<=n;i++)
{
if(i%==) printf("I hate ");
else printf("I love ");
if(i<n) printf("that ");
}
printf("it\n");
return ;
}
CodeForces 705A Hulk的更多相关文章
- 【模拟】Codeforces 705A Hulk
题目链接: http://codeforces.com/problemset/problem/705/A 题目大意: 给一个数N(N<=100),N=1时输出"I hate it&qu ...
- CodeForces 705A Hulk (水题)
题意:输入一个 n,让你输出一行字符串. 析:很水题,只要判定奇偶性,输出就好. 代码如下: #pragma comment(linker, "/STACK:1024000000,10240 ...
- codeforces 705A:Hulk
Description Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely ta ...
- CodeForces 705A(训练水题)
题目链接:http://codeforces.com/problemset/problem/705/A 从第三个输出中可看出规律, I hate that I love that I hate it ...
- python爬虫学习(5) —— 扒一下codeforces题面
上一次我们拿学校的URP做了个小小的demo.... 其实我们还可以把每个学生的证件照爬下来做成一个证件照校花校草评比 另外也可以写一个物理实验自动选课... 但是出于多种原因,,还是绕开这些敏感话题 ...
- 【Codeforces 738D】Sea Battle(贪心)
http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 × n g ...
- 【Codeforces 738C】Road to Cinema
http://codeforces.com/contest/738/problem/C Vasya is currently at a car rental service, and he wants ...
- 【Codeforces 738A】Interview with Oleg
http://codeforces.com/contest/738/problem/A Polycarp has interviewed Oleg and has written the interv ...
- CodeForces - 662A Gambling Nim
http://codeforces.com/problemset/problem/662/A 题目大意: 给定n(n <= 500000)张卡片,每张卡片的两个面都写有数字,每个面都有0.5的概 ...
随机推荐
- Css3新特性应用之过渡与动画
目录 背景与边框第一部分 背景与边框第二部分 形状 视觉效果 字体排印 用户体验 结构与布局 过渡与动画 源码下载 一.缓动效果 学习和利用贝塞尔曲线,默认支持ease,ease-in,ease-ou ...
- MySQL基础知识2
- [HMLY]10.深入研究Block用weakSelf、strongSelf、@weakify、@strongify解决循环引用
前言 在上篇中,仔细分析了一下Block的实现原理以及__block捕获外部变量的原理.然而实际使用Block过程中,还是会遇到一些问题,比如Retain Circle的问题. 目录 1.Retain ...
- 关于IIS强制配置启用IE8以上浏览器兼容打开系统
关于兼容性问题,采用了IIS7自定义标头的方案,经测试,适用可行.(本人使用的是第二种方式) 指定自定义 HTTP 响应标头 1.使用 IIS Web 服务器为站点定义自定义标头即可为您的网站指定文 ...
- http缓存与cdn相关技术
阅读目录 一 http缓存 二.Http缓存概念解析 三.cdn相关技术 摘要:最近要做这个主题的组内分享,所以准备了一个星期,查了比较多的资料.准备的过程虽然很烦很耗时间,不过因为需要查很多的资料, ...
- yeoman生成react基本架构
工欲善其事必先利其器.在开始react开始之前,我们先使用一系列的前段工具构建自己的前端集成解决方案. 环境配置: Bower,node js,npm,Grunt,Gulp,Yeoman 作者一直使用 ...
- css技巧总结
本文旨在记录css中比较特殊的属性的用法,先按项目的时间顺记录,以后再整理. a,input,button,select,textarea{ outline:none; -webkit-tap-hig ...
- hdu5976贪心乘法逆元
hdu 5976 Detachment题目连接 题意: 给定一个自然数x,让你给出一种拆分方式n=a1+a2+...(ai≠aj),使得每个小部分的乘积s=a1*a2*...最大 解题思路: 我们要乘 ...
- hibernate事务控制
在使用ssh中将事务委托给spring时老是出现事务不可用 经过检查,原因如下: 是因为在hibernate.cfg.xml文件中忘记进行了如下设置: hibernate.current_sessio ...
- Tarjan算法详解
Tarjan算法详解 今天偶然发现了这个算法,看了好久,终于明白了一些表层的知识....在这里和大家分享一下... Tarjan算法是一个求解极大强联通子图的算法,相信这些东西大家都在网络上百度过了, ...