結果
問題 |
No.5 数字のブロック
|
ユーザー |
![]() |
提出日時 | 2018-11-11 23:34:49 |
言語 | PHP (843.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 385 bytes |
コンパイル時間 | 6,061 ms |
コンパイル使用メモリ | 30,568 KB |
実行使用メモリ | 31,492 KB |
最終ジャッジ日時 | 2024-12-15 19:06:25 |
合計ジャッジ時間 | 9,075 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 28 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php $big_box = trim(fgets(STDIN)); $num_box = trim(fgets(STDIN)); $width = trim(fgets(STDIN)); $total = 0; $number = 0; $arr_width = explode(' ', $width); for($i=0; $i<=$num_box; $i++){ foreach($arr_width as $key => $value) { $total += $value; if($total >= $big_box){ break; } else{ $number++; } } } print $number; ?>