結果
| 問題 | No.436 ccw |
| コンテスト | |
| ユーザー |
mosmos_21
|
| 提出日時 | 2017-06-28 10:08:24 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 50 ms / 2,000 ms |
| + 417µs | |
| コード長 | 462 bytes |
| 記録 | |
| コンパイル時間 | 1,484 ms |
| コンパイル使用メモリ | 84,284 KB |
| 実行使用メモリ | 40,296 KB |
| 最終ジャッジ日時 | 2026-09-10 05:00:35 |
| 合計ジャッジ時間 | 3,729 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 |
ソースコード
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine();
int c = 0, w = 0;
for(int i = 0; i < s.length(); i++){
if(s.charAt(i) == 'c') c++;
else w++;
}
System.out.println(Math.min(c - 1, w));
}
}
mosmos_21