結果
| 問題 |
No.524 コインゲーム
|
| コンテスト | |
| ユーザー |
masakt
|
| 提出日時 | 2017-06-02 23:46:43 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 902 bytes |
| コンパイル時間 | 618 ms |
| コンパイル使用メモリ | 72,136 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-22 03:35:36 |
| 合計ジャッジ時間 | 1,668 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 WA * 8 |
ソースコード
#include <algorithm>
#include <iomanip>
#include <istream>
#include <map>
#include <numeric>
#include <ostream>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
// Powered by caide (code generator, tester, and library code inliner)
class Solution {
public:
void solve(std::istream& in, std::ostream& out) {
unsigned long n;
in >> n;
n = (n % 10) == 1 ? 2 : (n % 10);
out << (n % 2 == 0 ? "O" : "X");
}
};
void solve(std::istream& in, std::ostream& out)
{
out << std::setprecision(12);
Solution solution;
solution.solve(in, out);
}
#include <fstream>
#include <iostream>
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
istream& in = cin;
ostream& out = cout;
solve(in, out);
return 0;
}
masakt