text
stringlengths
49
983k
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 100; long long int a[N], data[N], res, x; int main() { ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; for (int i = 1; i < n; ++i) { if (i % 2 == 1) cout << "I hate that "; else cout << "I love that "; } if (n % 2 == 1) cout << "I hate it"; else cout << "I love it"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { cout << "I "; if (i % 2 == 0) { cout << "love "; } else { cout << "hate "; } if (i != n) { cout << "that "; } } cout << "it" << endl; }
#include <bits/stdc++.h> int main() { std::string emotion = ""; unsigned short n, i = 0; std::cin >> n; if (n < 1 || n > 100) return -1; for (unsigned short i = 1; i <= n; ++i) { if (i % 2 == 0) emotion += "I love "; else emotion += "I hate "; if (i != n) emotion += "that "; } emotion += "it"; std::cout << emotion; }
#include <bits/stdc++.h> using namespace std; int a, b, i; int main() { cin >> a; for (int i = 1; i <= a; i++) { if (i % 2 == 1 and i != a) { cout << "I hate that "; } if (i % 2 == 0 and i != a) { cout << "I love that "; } if (i % 2 == 1 and i == a) { cout << "I hate it"; } if (i % 2 == 0 and i == a) { cout << "I love it"; } } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; string a = "I love that "; string b = "I hate that "; for (int i = 1; i <= t; i++) { if (i == t && i % 2 == 0) cout << "I love it"; else if (i == t && i % 2 != 0) cout << "I hate it"; else if (i % 2 == 0) cout << a; else cout << b; } }
#include <bits/stdc++.h> using namespace std; int main() { long long s; cin >> s; for (int i = 1; i < s; ++i) { if (i % 2 != 0) { cout << "I hate that "; } else { cout << "I love that "; } } if (s % 2 == 0) { cout << "I love it"; } else { cout << "I hate it"; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 1; i < n; i++) { if (i % 2 == 0) cout << "I love that" << " "; else cout << "I hate that" << " "; } if (n % 2 == 0) cout << "I love it"; else cout << "I hate it"; return 0; }
#include <bits/stdc++.h> using namespace std; const int MAXN = 1000; const string s1 = "I hate that"; const string s2 = "I love that"; const string s3 = "I hate it"; const string s4 = "I love it"; int main() { int n, i; cin >> n; string s = ""; for (i = 0; i < n - 1; i++) { if (i % 2 == 0) { s += s1; } else { s += s2; } s += " "; } if (i % 2 == 0) { s += s3; } else { s += s4; } cout << s; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { if (i % 2 == 0) { cout << "I hate "; if (i == n - 1) cout << "it "; else cout << "that "; } else { cout << "I love "; if (i == n - 1) cout << "it "; else cout << "that "; } } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string answer = ""; for (int i = 1; i <= n; i++) { if (i % 2 == 1) { if (i == 1) answer += "I hate"; else answer += " that I hate"; } else { answer += " that I love"; } } cout << answer + " it"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, i; cin >> n; for (i = 1; i <= n; i++) { if (i % 2 != 0) { if (i == n) { cout << " I hate it"; break; } cout << " I hate that"; } else { if (i == n) { cout << " I love it"; break; } cout << " I love that"; } } }
#include <bits/stdc++.h> using namespace std; void solve() { int n; string s[2] = {"hate", "love"}; string last; cin >> n; if (n == 1) { cout << "I hate it"; } else { cout << "I "; for (int i = 0; i < n - 1; i++) { cout << s[i % 2] << " that I "; } n % 2 == 0 ? last = "love" : last = "hate"; cout << last << " it"; } } int main() { ios_base::sync_with_stdio(0); cin.tie(0); solve(); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; for (int i = 0; i < n; i++) { if (i > 0) { cout << "that "; } if (i % 2 == 0) { cout << "I hate "; } else { cout << "I love "; } if (i == n - 1) { cout << "it"; } } return 0; }
#include <bits/stdc++.h> using namespace std; const int mod = 1e9 + 7; const double EPS = 1e-9; const int INF = 1 << 29; int main() { int n; cin >> n; for (int i = 1; i < n; ++i) { cout << "I "; if (i & 1) { cout << "hate "; } else cout << "love "; cout << "that "; } cout << "I "; if (n & 1) { cout << "hate "; } else cout << "love "; cout << "it\n"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s1 = "I hate"; string s2 = "I love"; string s{}; int n; cin >> n; for (int i = 1; i <= n; i++) { if (i % 2 != 0) { s += s1; } else { s += s2; } if (i == n) { s += " it"; } else { s += " that "; } } cout << s << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; size_t i = 1; string res = "I hate "; if (n >= 2) res.append("that "); for (i = 2; i <= n - 1; i++) { if (i % 2 == 1) { res.append("I hate that "); } else { res.append("I love that "); } } if (n >= 2) { if (i % 2 == 1) { res.append("I hate "); } else { res.append("I love "); } } res.append("it"); cout << res << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << "I hate"; for (int i = 0; i < n - 1; i++) { if (i % 2 == 0) cout << " that I love"; if (i % 2 == 1) cout << " that I hate"; } cout << " it"; cout << endl; }
#include <bits/stdc++.h> using namespace std; string express(int layers) { string ans = ""; for (int i = 1; i <= layers; i++) { if (i % 2 == 1) { if (i == layers) { ans += "I hate it"; } else { ans += "I hate that "; } } else { if (i == layers) { ans += "I love it"; } else { ans += "I love that "; } } } return ans; } int main() { int layers; cin >> layers; cout << express(layers); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; for (int i = 0; i < a; i++) { if (i % 2 == 0) { cout << "I hate "; } else { cout << "I love "; } if (i == a - 1) { cout << "it"; } else { cout << "that "; } } }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << "I hate"; for (int i = 1; i < n; ++i) { cout << (i % 2 == 1 ? " that I love" : " that I hate"); } cout << " it"; return 0; }
#include <bits/stdc++.h> int main() { int n, i; scanf("%d", &n); for (i = 1; i <= n; i++) { if (i > 1) { printf("that "); } if (i % 2 != 0) { printf("I hate "); } else { printf("I love "); } } printf("it"); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int a, i; bool b = true; cin >> a; for (i = a; i > 0; i--) { if (b) { cout << "I hate "; } else { cout << "I love "; } if (i == 1) { cout << "it "; } else { cout << "that "; } b = !b; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; bool flag1 = false, flag2 = false; int i = 0; if (n == 1) return 0 & printf("I hate it"); while (i < n) { for (int j = 0; j < 2; j++) { if (j == 0) { printf("I hate that "); i++; if (i == n - 1) { flag1 = true; break; } } if (j == 1) { printf("I love that "); i++; if (i == n - 1) { flag2 = true; break; } } } if (flag1 || flag2) break; } if (flag1) return 0 & printf("I love it"); if (flag2) return 0 & printf("I hate it"); }
#include <bits/stdc++.h> using namespace std; int main() { int n, j; string h = "I hate "; string l = "I love "; cin >> n; for (int i = 1; i <= n; i++) { if (i % 2 != 0) { cout << h; if (i == n) { cout << "it "; } else { cout << "that "; } } else { cout << l; if (i == n) { cout << "it "; } else { cout << "that "; } } } }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { if (i % 2 == 1) { cout << "I hate "; } else { cout << "I love "; } if (i != n) { cout << "that "; } else { cout << "it"; } } }
#include <bits/stdc++.h> using namespace std; const int maxn = 1010; const int inf = 1e9; const int mod = 1e9 + 7; template <typename T> inline void getint(T* _num) { (*_num) = 0; int _op = 1; bool _ok = 0; char _c; while (1) { _c = getchar(); if (_c == '-') _op = -1; if (_c <= 57 && _c >= 48) { _ok = 1; (*_num) = (*_num) * 10 + _c - 48; } else if (_ok) if (_ok) { (*_num) *= _op; return; } } } template <typename T> void outint(T _out) { if (_out >= 10) outint(_out / 10); putchar(_out % 10 + 48); } int main() { int n; getint(&n); printf("I hate "); n--; int i = 1; while (i <= n) { if (i <= n) printf("that I love "), i++; if (i <= n) printf("that I hate "), i++; } printf("it"); return 0; }
#include <bits/stdc++.h> using namespace std; int main(int argc, const char* argv[]) { int n; cin >> n; string str = "I hate it"; for (int i = 2; i <= n; i++) { if (i % 2 != 0) { str.erase(str.length() - 2, 2); str += "that I hate it"; } else { str.erase(str.length() - 2, 2); str += "that I love it"; } } cout << str; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int N; cin >> N; for (int i = 1; i <= N; i++) { if (i != N) { if (i % 2 == 0) { cout << "I love that "; } else cout << "I hate that "; } else { if (i % 2 == 0) { cout << "I love it" << endl; } else cout << "I hate it" << endl; } } }
#include <bits/stdc++.h> using namespace std; int main() { int i, n; cin >> n; for (i = 0; i < n - 1; i++) if (i % 2 == 0) cout << "I hate that "; else cout << "I love that "; if (n % 2 != 0) cout << "I hate it "; else cout << "I love it "; }
#include <bits/stdc++.h> using namespace std; int main() { string s; int n; cin >> n; if (n == 1) { cout << "I hate it"; } if (n > 1) { for (int i = 1; i <= n; i++) { s = s + "I hate that "; s = s + "I love that "; } s.erase(s.size() / 2, s.size()); s.erase(s.size() - 5, s.size()); s = s + "it"; cout << s; } return 0; }
#include <bits/stdc++.h> using namespace std; int n; int main() { cin >> n; for (int i = 1; i < n; i++) { if (i % 2 == 1) cout << "I hate that "; else cout << "I love that "; } if (n % 2 == 1) cout << "I hate it"; else cout << "I love it"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { if (i % 2) cout << "I hate"; else cout << "I love"; if (i < n) cout << " that "; else cout << " it "; } }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; for (int i = 1; N >= i; i++) { if (i % 2 != 0) { cout << "I hate"; if (N - 1 >= i) cout << " that "; } if (i % 2 == 0) { cout << "I love"; if (N - 1 >= i) cout << " that "; } } cout << " it"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int i, num, cnt = 1; scanf("%d", &num); for (i = 0; i < num; i++, cnt++) { if (cnt == 1) printf("I hate "); else if (cnt == 2) { printf("I love "); cnt = 0; } if (i != num - 1) printf("that "); else printf("it\n"); } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; cout << "I hate "; string s = "that I love ", t = "that I hate "; for (long long int i = 2; i <= n; i++) { if (i % 2 == 0) cout << s; else cout << t; } cout << "it"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { cout << "I "; if (i % 2 != 0) { cout << "hate "; } else { cout << "love "; } if (i != n) { cout << "that "; } } cout << "it"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string a[2] = {" that I hate", " that I love"}; cout << "I hate"; for (int i = 1; i < n; i++) { cout << a[i % 2]; } cout << " it"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a; for (b = 1; b < a; b++) { if (b % 2 != 0) { cout << "I hate that "; } else { cout << "I love that "; } } if (a % 2 == 0) { cout << "I love it" << endl; } else { cout << "I hate it" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; string s1 = "I hate "; string s2 = "I love "; cin >> n; for (int i = 0; i < n; i++) { if (i % 2 == 0) cout << s1; else cout << s2; if (i != n - 1) cout << "that "; else cout << "it" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, i; cin >> n; if (n == 1) cout << "I hate it"; else { i = 1; for (; i <= n; ++i) { if (i % 2 == 0 && i == n) cout << "I love it"; else if (i % 2 != 0 && i == n) cout << "I hate it"; else if (i % 2 == 0) cout << "I love that "; else if (i % 2 != 0) cout << "I hate that "; } } }
#include <bits/stdc++.h> using namespace std; int main() { int num; int check = 1; cin >> num; for (int i = 1; i <= num; i++) { if (check == 1) { cout << "I hate "; check = 0; } else { cout << "I love "; check = 1; } if (i == num) cout << "it"; else cout << "that "; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string a = ""; if (n == 1) { cout << "I hate it"; return 0; } else { for (int i = 1; i <= n; i++) { if (i % 2 == 1) a += "I hate "; else a += "I love "; if (i < n) a += "that "; } a += "it"; cout << a; } return 0; }
#include <bits/stdc++.h> int main() { int n; scanf("%d", &n); for (int i = 1; i <= n; i++) { printf("I "); if (i % 2 == 0) printf("love "); else printf("hate "); if (i == n) printf("it"); else printf("that "); } }
#include <bits/stdc++.h> using namespace std; string hulkFeeling(int n); int main() { int n; scanf("%d", &n); printf("%s", hulkFeeling(n).c_str()); return 0; } string hulkFeeling(int n) { string result(""); string feelings[2] = {"I hate ", "I love "}; for (int i = 0; i < n; ++i) { result += feelings[i % 2]; if (i < n - 1) { result += "that "; } } result += "it"; return result; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { if (i % 2 != 0) { cout << "I love "; } else { cout << "I hate "; } if (i < n - 1) { cout << "that "; } } cout << "it"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { if (i % 2 == 0) cout << "I love "; else cout << "I hate "; if (i != n) cout << "that "; } cout << "it"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << "I hate "; n -= 1; while (n) { cout << "that I love "; n -= 1; if (n > 0) { cout << "that I hate "; n -= 1; } } cout << "it" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long n; string var[2] = {"that I hate ", "that I love "}; cin >> n; cout << "I hate "; for (long long i = 1; i < n; i++) { cout << var[i % 2]; } cout << "it"; return 0; }
#include <bits/stdc++.h> int main() { int n, i; scanf("%d", &n); for (i = 1; i <= n; i++) { if (i % 2 != 0 && i < n) { printf("I hate that "); } if (i == n && n % 2 == 0) { printf("I love it "); } if (i % 2 == 0 && i < n) { printf("I love that "); } if (i == n && n % 2 != 0) { printf("I hate it "); } } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int testCases; cin >> testCases; for (int i = 0; i < testCases; i++) { cout << "I "; if (i % 2 == 0) cout << "hate "; else cout << "love "; if (i == (testCases - 1)) break; if (i > 1 || i != (testCases - 1)) cout << "that "; } cout << "it\n"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string s1 = "I hate ", s2 = "I love "; for (int i = 1; i < n; i++) { if (i % 2 != 0) { cout << s1 << "that "; } else { cout << s2 << "that "; } } if (n % 2 != 0) { cout << "I hate it"; } else { cout << "I love it"; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string output = "I hate"; int n; cin >> n; for (int i = 2; i <= n; i++) { if (i % 2 == 0) { output += " that I love"; } else { output += " that I hate"; } } output += " it"; cout << output; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n) { string s = "I", odd = "hate", even = "love", notend = "that", finish = "it"; for (int i = 1; i <= n; i++) { cout << s << " "; if (i % 2 == 1) cout << odd << " "; else cout << even << " "; if (i == n) cout << finish << endl; else cout << notend << " "; } } }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string s = "I hate"; for (int i = 2; i <= n; ++i) { if (i % 2 == 0) s += " that I love"; else s += " that I hate"; } cout << s << " it"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; string res = ""; cin >> n; for (int i = 1; i <= n; i++) { if (i % 2 == 0) { if (i == n) { res += "I love it "; } else { res += "I love that "; } } else if (i % 2 != 0) { if (i == n) { res += "I hate it "; } else { res += "I hate that "; } } } cout << res << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; for (int i = 1; i <= N; i++) { if (i == N) { if (i % 2 == 1) cout << "I hate it"; if (i % 2 == 0) cout << "I love it"; } if (i != N) { if (i % 2 == 1) cout << "I hate that "; if (i % 2 == 0) cout << "I love that "; } } cout << "\n"; return 0; }
#include <bits/stdc++.h> int main() { int n, i; scanf("%d", &n); for (i = 1; i <= n; i++) { if (i % 2 == 1) printf("I hate"); else printf("I love"); if (i == n) printf(" it "); else printf(" that "); } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long n; int i; while (cin >> n) { cout << "I hate"; for (i = 2; i <= n; i++) { if (i % 2 == 0) cout << " that I love"; else cout << " that I hate"; } cout << " it" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); int n; cin >> n; vector<string> s(2); s[0] = "hate"; s[1] = "love"; cout << "I "; int j = 0; for (int i = 0; i < n; i++) { if (j % 2 == 0) cout << s[0] << " "; else cout << s[1] << " "; j++; if (i != n - 1) cout << "that I "; } cout << "it" << endl; return 0; }
#include <bits/stdc++.h> int main(void) { int TOTAL; int COUNT = 0; scanf("%d", &TOTAL); for (COUNT = 0; COUNT < TOTAL; COUNT++) { if (COUNT == 0) { printf("I hate "); } else if (COUNT % 2 == 1) { printf("that I love "); } else { printf("that I hate "); } } printf("it\n"); }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, l[100], s = 0; cin >> a; if (a % 2 == 0) { a = a - 1; while (a != 0) { if (a % 2 == 1) { cout << "I hate that"; } else { cout << " I love that "; } a--; } cout << " I love it"; } else { a = a - 1; while (a != 0) { if (a % 2 == 0) { cout << "I hate that"; } else { cout << " I love that "; } a--; } cout << "I hate it"; } }
#include <bits/stdc++.h> using namespace std; int main() { int i, n; cin >> n; cout << "I hate "; for (i = 2; i <= n; i++) { if (i % 2 == 0) cout << "that I love "; else cout << "that I hate "; } cout << "it"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string f = " I hate "; string s = " I love "; string res; int n, i = 1; cin >> n; if (n == 1) { cout << "I hate it"; return 0; } while (i < n) { if (i % 2) res += f + " that "; else res += s + " that "; i++; } if (n % 2 == 0) cout << res << s << " it "; else cout << res << f << " it "; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { if (i % 2 == 0) cout << "I love"; else cout << "I hate"; if (i != n) cout << " that "; else cout << " it"; } }
#include <bits/stdc++.h> using namespace std; int main() { int n; string res_str, str1, str2; cin >> n; res_str = "I hate "; str1 = "that I love "; str2 = "that I hate "; for (int i = 0; i < n - 1; i++) { if (i % 2) res_str += str2; else res_str += str1; } cout << res_str + "it" << endl; return 0; }
#include <bits/stdc++.h> int main() { int n, i; scanf("%d", &n); for (i = 1; i <= n; i++) { if (i % 2 != 0) { if (i != n) { printf(" I hate that"); } else { printf(" I hate it"); } } else { if (i != n) { printf(" I love that"); } else { printf(" I love it"); } } } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { if (i % 2 != 0) cout << "I love "; else cout << "I hate "; if (i + 1 < n) cout << "that "; } cout << "it" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string end[] = {"I hate it", "I love it"}; string cont[] = {"I hate that", "I love that"}; int c = 1; while (c <= n) { if (c == n) { c % 2 == 0 ? cout << "I love it " : cout << "I hate it "; break; } else { c % 2 == 0 ? cout << "I love that " : cout << "I hate that "; } c++; } }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string str[] = {"hate", "love"}; string s("I"), m("that"), e("it"); string res(""); int i; for (i = 0; i < n - 1; i++) { if (i % 2 == 0 && !(i == 0)) { res = res + s + " " + str[i % 2] + " " + m + " "; } else if (i == 0 && n == 1) { res = res + s + " " + str[i]; } else if (i == 0 && !(n == 1)) { res = res + s + " " + str[i] + " " + m + " "; } else res = res + s + " " + str[i % 2] + " " + m + " "; } if (i == 1 && n == 1) res = res + " " + e; else if (i == n - 1) { res = res + s + " " + str[i % 2] + " " + e; } else res = res + e; cout << res; }
#include <bits/stdc++.h> using namespace std; const int mod = 1e9 + 7; const long long M = 998244353; long long const INF = 1e19; const int num = 1e6 + 2; const double pi = acos(-1); int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; cin >> n; if (n == 1) { cout << "I hate it"; return 0; } for (int i = 1; i <= n - 1; 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"; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; int m = a; for (int i = 1; i <= a; i += 0) { if (i % 2 != 0 && i <= a) cout << "I hate"; if (m == 1) cout << " it"; else if (m > 1) { cout << " that "; } m--; i++; if (i % 2 == 0 && i <= a) cout << "I love"; if (m == 1) cout << " it"; else if (m > 1) cout << " that "; m--; i++; } }
#include <bits/stdc++.h> using namespace std; int main() { int n, i, k; cin >> n; i = 0; k = 1; while (i != n) { if (k != 1) { cout << "that "; } if (k % 2 == 1) { cout << "I hate "; k++; i++; } else if (k % 2 == 0) { cout << "I love "; k++; i++; } } cout << "it"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, i; cin >> n; for (i = 1; i <= n; i++) { if (i % 2 != 0) cout << "I hate" << " "; else cout << "I love" << " "; if (i == n) cout << "it" << " "; else cout << "that" << " "; } }
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; cin >> n; string h, l, t, s; h = "I hate"; l = "I love"; t = " that "; for (int i = 0; i < n; i++) { if (i % 2 == 0) { s = s + h; } else { s = s + l; } if (i == n - 1) { s = s + " it"; } else { s = s + t; } } cout << s << "\n"; }
#include <bits/stdc++.h> int main(void) { int num; std::cin >> num; for (int i = 0; i < num; i++) { std::cout << "I "; if (i % 2 == 0) { std::cout << "hate "; } if (i % 2 == 1) { std::cout << "love "; } if (i != num - 1) { std::cout << "that "; } } std::cout << "it\n"; return 0; }
#include <bits/stdc++.h> using namespace std; int n, i; int main() { cin >> n; cout << "I hate"; for (i = 1; i < n; i++) { if (i % 2 > 0) cout << " that I love"; else cout << " that I hate"; } cout << " it"; }
#include <bits/stdc++.h> using namespace std; int main() { string s; int n; cin >> n; for (int i = 0; i < n; i++) { if (i & 1) { s = "I love"; } else { s = "I hate"; } if (i == n - 1) { cout << s << " it"; } else { cout << s << " that "; } } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n) { for (int i = 1; i <= n; i++) { if (i % 2 != 0) cout << "I hate "; else cout << "I love "; if (i != n) cout << "that "; } cout << "it" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string s1 = "I hate "; string s2 = "I love "; while (n > 0) { cout << s1; n = n - 1; if (n == 0) { break; } cout << "that "; cout << s2; n = n - 1; if (n == 0) { break; } cout << "that "; } cout << "it"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string str = ""; for (int i = 0; i < n; i++) { if ((n == 1) && (i % 2 == 0)) { str += "I hate it "; } if ((n > 1) && (i % 2 == 0) && (i != (n - 1))) { str += "I hate that "; } if ((n > 1) && (i % 2 == 1) && (i != (n - 1))) { str += "I love that "; } if ((i == (n - 1)) && (n != 1) && (n % 2 == 1)) { str += "I hate it "; } if ((i == (n - 1)) && (n != 1) && (n % 2 == 0)) { str += "I love it "; } } cout << str << "\n"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; cout << "I hate "; int i = 1; while (i < t) { if (i % 2 == 0) cout << "that I hate "; else cout << "that I love "; ++i; } cout << "it"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { if (i % 2) cout << "I hate "; else cout << "I love "; if (i < n) cout << "that "; else cout << "it" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 1; i < n + 1; i++) { if (i == n && n % 2 == 1) { cout << "I hate it "; break; } else if (i == n && n % 2 == 0) { cout << "I love it "; break; } else if (i % 2 == 1) cout << "I hate that "; else cout << "I love that "; } return 0; }
#include <bits/stdc++.h> int main() { int n; scanf("%d", &n); for (int i = 1; i <= n; i++) { if (i % 2 == 0) { printf("I love "); } else { printf("I hate "); } if (i != n) { printf("that "); } } printf("it\n"); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { bool said_love = false; string love = "I love ", hate = "I hate "; string it = "it "; string that = "that "; string expression = ""; int n; cin >> n; expression = hate; while (true) { if (n == 1) { expression += it; break; } else expression += that; if (said_love) { expression += hate; said_love = false; } else { expression += love; said_love = true; } n--; } cout << expression << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { cout << "I "; if (i % 2 == 0) cout << "hate "; else cout << "love "; if (i == n - 1) cout << "it "; else cout << "that "; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; ++i) { if (i % 2 == 0) { cout << "I hate "; } if (i % 2 == 1) { cout << "I love "; } if (i != n - 1) { cout << "that "; } } cout << "it"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { if (i > 1) cout << "that "; if (i % 2 == 1) cout << "I hate "; else cout << "I love "; } cout << "it "; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << "I" << " "; while (n > 0) { if (n) { cout << "hate" << " "; n--; } if (n) { cout << "that I" << " "; cout << "love" << " "; n--; } if (n) { cout << "that I" << " "; } } cout << "it"; }
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, t = 0, k, i, w; cin >> n; for (i = 1; i <= n; i++) { if (i % 2 == 0 && i != n) cout << "I love that" << " "; else if (i % 2 != 0 && i != n) cout << "I hate that" << " "; else if (i % 2 == 0 && i == n) cout << "I love it" << " "; else if (i % 2 != 0 && i == n) cout << "I hate it" << " "; } }
#include <bits/stdc++.h> using namespace std; const int inf = 0x3f3f3f3f; const int maxn = 1e5 + 15; const int maxm = 1e6 + 15; string ans; void fuck(int n, int k) { if (n == 1 and k) { ans += "I hate it"; return; } if (n == 1 and !k) { ans += "I love it"; return; } if (k) ans += "I hate that "; else ans += "I love that "; fuck(n - 1, k ^ 1); } int main() { int n; cin >> n; fuck(n, 1); cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n - 1; i++) { if (i % 2 == 0) cout << "I hate that "; else cout << "I love that "; } if (n % 2 == 0) cout << "I love it"; else cout << "I hate it"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { if ((i % 2 != 0) && (i != n)) cout << " I hate that" << " "; if ((i % 2 == 0) && (i != n)) cout << " I love that" << " "; if ((i % 2 != 0) && (i == n)) cout << " I hate it" << " "; if ((i % 2 == 0) && (i == n)) cout << " I love it" << " "; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; string s2 = "I hate "; string l = "that I hate "; string g = "that I love "; string gf = "it"; string s1 = "that I love "; string s3 = "that I love that I hate "; cin >> n; cout << s2; if (n == 2) cout << s1; else if (n == 3) cout << s3; else if (n != 1) { for (int i = 2; i <= n; i++) { if (i % 2 == 0) cout << g; else cout << l; } } cout << gf; }
#include <bits/stdc++.h> using namespace std; int main() { int n; bool feelings = false; cin >> n; for (int i = 0; i < n - 1; i++) { if (feelings) cout << "I love that "; else cout << "I hate that "; if (feelings) feelings = false; else feelings = true; } if (feelings) cout << "I love it"; else cout << "I hate it"; return 0; }
#include <bits/stdc++.h> int main() { int n; scanf("%d", &n); printf("I hate"); while (--n) { printf(" that I love"); if (--n == 0) break; printf(" that I hate"); } printf(" it"); }
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int a; cin >> a; string k = ""; if (a == 1) { cout << "I hate it"; return 0; } for (int i = 0; i < a; i++) { if (i % 2 == 1) { k += "I love "; if (i == (a - 1)) { k += "it"; } else k += "that "; } else { k += "I hate "; if (i == (a - 1)) { k += "it"; } else k += "that "; } } cout << k; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { if (i % 2 == 0) { cout << "I hate"; } else { cout << "I love"; } if (i + 1 != n) { cout << " that "; } else { cout << " "; } } cout << "it"; }
#include <bits/stdc++.h> using namespace std; int main() { string a = "I love"; string b = "I hate"; string c = " that "; string d = " it"; int n; cin >> n; for (int i = 1; i <= n; i++) { if (i % 2 == 0) cout << a; if (i % 2 == 1) cout << b; if (i < n) cout << c; if (i == n) cout << d; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { if (i % 2 != 0) { if (i != n) cout << "I hate that "; else cout << "I hate it "; } else { if (i != n) { cout << "I love that "; } else { cout << "I love it "; } } } }