結果
問題 |
No.436 ccw
|
ユーザー |
![]() |
提出日時 | 2016-10-29 11:50:24 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 179 ms / 2,000 ms |
コード長 | 324 bytes |
コンパイル時間 | 3,265 ms |
コンパイル使用メモリ | 75,020 KB |
実行使用メモリ | 54,448 KB |
最終ジャッジ日時 | 2024-11-24 17:45:19 |
合計ジャッジ時間 | 7,599 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 |
ソースコード
import java.util.*; public class Exercise161 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); String str = sc.next(); int cCount = str.lastIndexOf('c'); int total = str.length(); int wCount = total - (cCount + 1); System.out.println(Math.min(cCount, wCount)); } }