結果
問題 |
No.279 木の数え上げ
|
ユーザー |
![]() |
提出日時 | 2016-11-29 20:20:39 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 480 bytes |
コンパイル時間 | 5,722 ms |
コンパイル使用メモリ | 74,780 KB |
実行使用メモリ | 57,320 KB |
最終ジャッジ日時 | 2024-11-27 13:50:16 |
合計ジャッジ時間 | 8,938 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 21 |
ソースコード
import java.util.*; import java.math.*; public class pre { public static void main(String[] args) { Scanner s = new Scanner(System.in); String str = s.next(); int t=0,r=0,e=0; for(int i=0; i<str.length();i++){ if(str.charAt(i)=='t') t++; else if(str.charAt(i)=='r') r++; else if(str.charAt(i)=='e') e++; } int count=0; while(t>0 || r>0 || e>0){ t--; r--; e-=2; count++; } System.out.println(count); } }