結果

問題 No.46 はじめのn歩
ユーザー jake_tarojake_taro
提出日時 2015-09-07 02:44:46
言語 PHP
(8.3.4)
結果
AC  
実行時間 21 ms / 5,000 ms
コード長 202 bytes
コンパイル時間 485 ms
コンパイル使用メモリ 18,480 KB
実行使用メモリ 18,812 KB
最終ジャッジ日時 2023-09-26 09:57:10
合計ジャッジ時間 1,422 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
18,812 KB
testcase_01 AC 21 ms
18,740 KB
testcase_02 AC 16 ms
18,556 KB
testcase_03 AC 16 ms
18,712 KB
testcase_04 AC 16 ms
18,704 KB
testcase_05 AC 21 ms
18,688 KB
testcase_06 AC 16 ms
18,768 KB
testcase_07 AC 16 ms
18,764 KB
testcase_08 AC 16 ms
18,688 KB
testcase_09 AC 16 ms
18,768 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$input = explode(" ", trim(fgets(STDIN)));
$a = $input[0];
$b = $input[1];

$sub = floor($b / $a);
$mod = $b % $a;

if($mod == 0){
    echo $sub, PHP_EOL;
}else if($mod > 0){
    echo $sub + 1;
}
0