結果
| 問題 | No.341 沈黙の期間 |
| コンテスト | |
| ユーザー |
tsunatama5
|
| 提出日時 | 2016-02-12 23:08:07 |
| 言語 | Perl (5.40.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 457 bytes |
| コンパイル時間 | 615 ms |
| コンパイル使用メモリ | 7,808 KB |
| 実行使用メモリ | 8,064 KB |
| 最終ジャッジ日時 | 2024-09-22 04:52:04 |
| 合計ジャッジ時間 | 1,598 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 WA * 4 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
#!/usr/bin/perl
use Encode;
use utf8;
$count = 0;
$tmpcount = 0;
$temp =0;
binmode STDIN, ':encoding(utf8)';
#binmode STDOUT, ':encoding(cp932)';
#binmode STDERR, ':encoding(CP932)';
while (<STDIN>) {
my $text = $_;
my @te = split(//, $text);
foreach my $tepart(@te) {
if ($tepart eq "…") {
if (($tmpcount+1) eq $temp) {
$count++;
} else {
$count = 1;
}
$tmpcount = $temp;
}
$temp++;
}
print "$count\n";
$count = 0;
}
tsunatama5