結果

問題 No.436 ccw
ユーザー rocoder
提出日時 2017-06-13 21:03:16
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 53 ms / 2,000 ms
コード長 157 bytes
コンパイル時間 141 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,648 KB
最終ジャッジ日時 2024-09-24 17:00:02
合計ジャッジ時間 2,084 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

S=list(input())
c=0
i=0
while S[i]=="c":
    c+=1
    i+=1
S.reverse()
w=0
i=0
while S[i]=="w":
    w+=1
    i+=1
if w>c-1:
    print(c-1)
else:
    print(w)
0