結果
問題 |
No.279 木の数え上げ
|
ユーザー |
![]() |
提出日時 | 2015-09-24 21:16:34 |
言語 | Perl (5.40.0) |
結果 |
MLE
|
実行時間 | - |
コード長 | 411 bytes |
コンパイル時間 | 561 ms |
コンパイル使用メモリ | 5,760 KB |
実行使用メモリ | 93,056 KB |
最終ジャッジ日時 | 2024-07-19 09:04:21 |
合計ジャッジ時間 | 4,541 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 MLE * 7 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
use strict; use warnings; my $s = <>; chomp $s; my @str = split //, $s; my @count; for(my $i = 0; $i < 3; $i++) { $count[$i] = 0; } for(my $i = 0; $i < $#str + 1; $i++) { if($str[$i] eq 't') { $count[0]++; } elsif($str[$i] eq 'r') { $count[1]++; } elsif($str[$i] eq 'e') { $count[2]++; } } $count[2] /= 2; $count[2] = int $count[2]; @count = sort {$a <=> $b} @count; print "$count[0]\n"; exit;