結果
| 問題 |
No.486 3 Straight Win(3連勝)
|
| コンテスト | |
| ユーザー |
turner18_jp
|
| 提出日時 | 2017-10-02 14:07:07 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 2,000 ms |
| コード長 | 411 bytes |
| コンパイル時間 | 82 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-06-26 04:33:25 |
| 合計ジャッジ時間 | 1,733 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 28 |
ソースコード
s = input()
def judge(s):
count = 1
temp = s[0]
if len(s) < 3:
return 'NA'
for i in s[1:]:
if i == temp:
count += 1
if count == 3:
if i == "O":
return 'East'
else:
return 'West'
else:
temp = i
count = 1
return 'NA'
print(judge(s))
turner18_jp