結果

問題 No.486 3 Straight Win(3連勝)
ユーザー 0w10w1
提出日時 2017-04-09 19:25:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 262 bytes
コンパイル時間 318 ms
コンパイル使用メモリ 86,836 KB
実行使用メモリ 71,636 KB
最終ジャッジ日時 2023-09-08 11:06:34
合計ジャッジ時間 3,833 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,220 KB
testcase_01 AC 73 ms
71,636 KB
testcase_02 AC 72 ms
71,300 KB
testcase_03 AC 70 ms
71,288 KB
testcase_04 AC 72 ms
71,216 KB
testcase_05 AC 72 ms
71,376 KB
testcase_06 AC 72 ms
71,368 KB
testcase_07 AC 73 ms
71,288 KB
testcase_08 AC 73 ms
71,412 KB
testcase_09 AC 71 ms
71,416 KB
testcase_10 AC 70 ms
71,444 KB
testcase_11 AC 72 ms
71,384 KB
testcase_12 AC 72 ms
71,244 KB
testcase_13 AC 77 ms
71,412 KB
testcase_14 AC 72 ms
71,380 KB
testcase_15 AC 73 ms
71,092 KB
testcase_16 AC 74 ms
71,440 KB
testcase_17 AC 72 ms
71,240 KB
testcase_18 AC 74 ms
71,240 KB
testcase_19 AC 74 ms
71,400 KB
testcase_20 AC 72 ms
71,376 KB
testcase_21 AC 72 ms
71,584 KB
testcase_22 AC 73 ms
71,416 KB
testcase_23 AC 72 ms
71,380 KB
testcase_24 AC 72 ms
71,320 KB
testcase_25 AC 73 ms
71,412 KB
testcase_26 AC 73 ms
71,476 KB
testcase_27 AC 72 ms
71,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
ptr = 0
while ptr + 3 <= len( S ):
  ng = False
  for i in range( ptr + 1, ptr + 3, 1 ):
    ng |= S[ ptr ] != S[ i ]
  if not ng:
    if S[ ptr ] == 'O':
      exit( print( "East" ) )
    else:
      exit( print( "West" ) )
  ptr += 1
print( "NA" )
0