結果
| 問題 | No.279 木の数え上げ |
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-03-07 16:42:30 |
| 言語 | C (gcc 15.2.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 590 bytes |
| 記録 | |
| コンパイル時間 | 189 ms |
| コンパイル使用メモリ | 38,496 KB |
| 最終ジャッジ日時 | 2026-02-22 13:05:00 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 RE * 11 |
ソースコード
#include <stdio.h>
int main(void){
char p[1000];
int count[3] = {0,0,0};
scanf("%s",p);
char *ptr = &p[0];
int i = 0;
while(*(ptr+i) != '\0'){
if(*(ptr+i) == 't'){
count[0]++;
}
if(*(ptr+i) == 'r'){
count[1]++;
}
if(*(ptr+i) == 'e'){
count[2]++;
}
i++;
}
count[2] = count[2]/2;
int max = count[0] , min = count[0];
for(i = 0;i < 3;i++){
if(min > count[i]){
min = count[i];
}
}
printf("%d\n",min);
return 0;
}
Maeda