結果
| 問題 | No.486 3 Straight Win(3連勝) |
| コンテスト | |
| ユーザー |
tatuyan_edson
|
| 提出日時 | 2017-02-23 22:04:50 |
| 言語 | C90(gcc15) (gcc 15.2.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 375 bytes |
| 記録 | |
| コンパイル時間 | 133 ms |
| コンパイル使用メモリ | 37,596 KB |
| 最終ジャッジ日時 | 2026-02-24 00:23:43 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 28 |
ソースコード
#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;
}
}
}
puts("NA");
return 0;
}
tatuyan_edson