結果

問題 No.524 コインゲーム
ユーザー yuppe19 😺
提出日時 2017-06-03 22:36:45
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 164 bytes
コンパイル時間 472 ms
コンパイル使用メモリ 53,680 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-22 04:39:40
合計ジャッジ時間 4,291 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 31 WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:4:15: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    4 |   int n; scanf("%d", &n);
      |          ~~~~~^~~~~~~~~~

ソースコード

diff #

#include <iostream>

int main(void) {
  int n; scanf("%d", &n);
  int val = 0;
  for(int i=1; i<=n; ++i) {
    val ^= i;
  }
  puts(val ? "O" : "X");
  return 0;
}
0