結果

問題 No.436 ccw
ユーザー mitsushino
提出日時 2016-12-10 20:59:03
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 449 bytes
コンパイル時間 305 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 21,504 KB
最終ジャッジ日時 2024-11-29 02:05:15
合計ジャッジ時間 16,599 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 19 TLE * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

def cnt_delete(s):
    original_s = s
    left_cnt = 0
    while True:
        if 'ccw' in s:
            s = s[1:]
            left_cnt += 1
        else:
            break

    right_cnt = 0
    s = original_s
    while True:
        if 'ccw' in s:
            s = s[:-1]
            right_cnt += 1
        else:
            break
    if left_cnt < right_cnt:
        print(left_cnt)
    else:
        print(right_cnt)


s = input()
cnt_delete(s)
0