結果
| 問題 |
No.436 ccw
|
| コンテスト | |
| ユーザー |
iicafiaxus
|
| 提出日時 | 2016-10-28 22:23:53 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 364 bytes |
| コンパイル時間 | 1,112 ms |
| コンパイル使用メモリ | 117,756 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-12 04:46:10 |
| 合計ジャッジ時間 | 2,195 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 |
ソースコード
import std.stdio;
import std.conv, std.array, std.algorithm, std.string;
import std.math, std.random, std.range, std.datetime;
import std.bigint;
void main(){
string s = readln.chomp;
int x, y;
foreach(c; s){
if(c == 'c') x += 1;
else if(c == 'w') y += 1;
}
int a = x - 1;
int b = y;
int ans;
if(a < b) ans = a; else ans = b;
ans.writeln;
}
iicafiaxus