結果

問題 No.436 ccw
ユーザー face4
提出日時 2018-04-22 21:32:42
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 272 bytes
コンパイル時間 618 ms
コンパイル使用メモリ 64,164 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-27 07:03:58
合計ジャッジ時間 1,621 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<cstring>
using namespace std;

int main(){
    string s;
    cin >> s;
    int i = -1;
    while(s[++i] != 'w');
    if(s.size() - i > i-2+1){
        cout << i-2+1 << endl;
    }else{
        cout << s.size() - i << endl;
    }
    return 0;
}
0