結果
問題 |
No.524 コインゲーム
|
ユーザー |
|
提出日時 | 2017-06-04 07:16:52 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 231 bytes |
コンパイル時間 | 598 ms |
コンパイル使用メモリ | 56,848 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 05:02:06 |
合計ジャッジ時間 | 8,931 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 TLE * 3 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:7:15: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | u32 n; scanf("%u", &n); | ~~~~~^~~~~~~~~~
ソースコード
#include <iostream> #include <algorithm> using namespace std; using u32 = unsigned int; int main(void) { u32 n; scanf("%u", &n); u32 val = 0; for(u32 i=n; i>0; --i) { val ^= i; } puts(val ? "O" : "X"); return 0; }