結果
問題 | No.289 数字を全て足そう |
ユーザー |
![]() |
提出日時 | 2019-05-17 22:37:44 |
言語 | Perl (5.40.0) |
結果 |
AC
|
実行時間 | 9 ms / 1,000 ms |
コード長 | 261 bytes |
コンパイル時間 | 50 ms |
コンパイル使用メモリ | 6,940 KB |
実行使用メモリ | 7,296 KB |
最終ジャッジ日時 | 2024-09-17 06:02:05 |
合計ジャッジ時間 | 1,243 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
my $str = <>;chomp ($str);my @str = split(//, $str);my $num;my @numbers;for my $word(@str){if($word =~ /[a-z]/){$num = 0;}else{push @numbers, $word;}}for my $numbers(@numbers){$num += $numbers}print "$num\n";