結果
問題 |
No.524 コインゲーム
|
ユーザー |
![]() |
提出日時 | 2021-03-11 23:52:58 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 1,220 bytes |
コンパイル時間 | 2,455 ms |
コンパイル使用メモリ | 165,976 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-13 10:43:30 |
合計ジャッジ時間 | 3,439 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
#include <bits/stdc++.h> //#include <atcoder/all> using namespace std; //using namespace atcoder; using ll = long long; using vll = vector<ll>; using vvll = vector<vll>; using pll = pair<ll, ll>; using vpll = vector<pll>; using ld = long double; using vld = vector<ld>; using vb = vector<bool>; #define rep(i, n) for (ll i = 0; i < (n); i++) #ifdef LOCAL #define dbg(x) cerr << __LINE__ << " : " << #x << " = " << (x) << endl #else #define dbg(x) true #endif template <class T> bool chmin(T& a, T b) { if(a > b) { a = b; return true; } else return false; } template <class T> bool chmax(T& a, T b) { if(a < b) { a = b; return true; } else return false; } template <class T> ostream& operator<<(ostream& s, const vector<T>& a) { for(auto i : a) s << i << ' '; return s; } constexpr int INF = 1 << 30; constexpr ll INFL = 1LL << 60; constexpr ld EPS = 1e-12; ld PI = acos(-1.0); // https://yukicoder.me/problems/no/524 void solve() { ll n; cin >> n; char c; if(n % 4 == 3) c = 'X'; else c = 'O'; cout << c << endl; return; } int main() { std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); cout << fixed << setprecision(15); solve(); }