結果
問題 |
No.436 ccw
|
ユーザー |
![]() |
提出日時 | 2019-08-27 14:41:26 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 438 bytes |
コンパイル時間 | 1,201 ms |
コンパイル使用メモリ | 30,208 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-15 18:29:36 |
合計ジャッジ時間 | 2,353 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 |
ソースコード
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> int main(void) { int c=0,w=0; char str[100000]=""; scanf("%s",str); for(int i=0;i<strlen(str);i++) { if(str[i]=='c') { c++; } else { w++; } } if(c>w) { printf("%d",w); } else { printf("%d",c-1); } }