結果
問題 | No.51 やる気の問題 |
ユーザー |
![]() |
提出日時 | 2015-04-08 14:41:25 |
言語 | Perl (5.40.0) |
結果 |
AC
|
実行時間 | 31 ms / 5,000 ms |
コード長 | 219 bytes |
コンパイル時間 | 159 ms |
コンパイル使用メモリ | 5,760 KB |
実行使用メモリ | 5,760 KB |
最終ジャッジ日時 | 2024-07-04 11:05:11 |
合計ジャッジ時間 | 1,285 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
#!/uer/bin/perl use strict; use warnings; my $w = <>; my $d = <>; my $ans; for(my $i = 0; $i < $d; $i++) { my $ans = $w / ($d - $i)**2; $ans = int $ans; $w -= $ans; if($d - $i == 1) { print "$ans\n"; } } exit;