結果

問題 No.486 3 Straight Win(3連勝)
ユーザー tatuyan_edson
提出日時 2017-02-23 22:04:06
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 363 bytes
コンパイル時間 2,685 ms
コンパイル使用メモリ 34,304 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2025-01-02 18:51:58
合計ジャッジ時間 2,122 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>

int main(void){
  int o=0,x=0;
  char str[128];
  int i;
  scanf("%s",str);
  for(i=0;str[i]!='\0';i++){
    if(str[i]=='O'){
      o++;
      x=0;
      if(o==3){
        puts("East");
        return 0;
      }
   }else if(str[i]=='X'){
      x++;
      o=0;
      if(x==3){
        puts("West");
        return 0;
      }
   }
}
  return 0;
}
0