結果

問題 No.436 ccw
ユーザー te-sh
提出日時 2017-10-30 11:29:13
言語 D
(dmd 2.109.1)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 185 bytes
コンパイル時間 764 ms
コンパイル使用メモリ 95,196 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-12 22:14:18
合計ジャッジ時間 1,612 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.algorithm, std.conv, std.range, std.stdio, std.string;

void main()
{
  auto s = readln.chomp;
  auto nc = s.countUntil('w'), nw = s.length - nc;
  writeln(min(nc-1, nw));
}
0