結果
問題 |
No.279 木の数え上げ
|
ユーザー |
|
提出日時 | 2016-03-29 13:05:43 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 318 ms / 2,000 ms |
コード長 | 464 bytes |
コンパイル時間 | 2,318 ms |
コンパイル使用メモリ | 74,148 KB |
実行使用メモリ | 45,764 KB |
最終ジャッジ日時 | 2024-10-14 15:26:59 |
合計ジャッジ時間 | 7,672 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc=new Scanner(System.in); String str=sc.next(); int countT=0; int countR=0; int countE=0; for(int i=0;i<str.length();i++){ if(str.charAt(i)=='t') countT++; if(str.charAt(i)=='r') countR++; if(str.charAt(i)=='e') countE++; } countE=countE/2; int count=Math.min(countT, Math.min(countR, countE)); System.out.println(count); } }