結果

問題 No.169 何分かかるの!?
ユーザー ayaaya
提出日時 2019-07-29 11:45:51
言語 PHP
(8.3.4)
結果
AC  
実行時間 16 ms / 1,000 ms
コード長 1,273 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 18,680 KB
実行使用メモリ 18,736 KB
最終ジャッジ日時 2023-09-15 11:45:50
合計ジャッジ時間 1,702 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
18,696 KB
testcase_01 AC 16 ms
18,560 KB
testcase_02 AC 16 ms
18,608 KB
testcase_03 AC 16 ms
18,716 KB
testcase_04 AC 15 ms
18,672 KB
testcase_05 AC 16 ms
18,728 KB
testcase_06 AC 16 ms
18,736 KB
testcase_07 AC 16 ms
18,712 KB
testcase_08 AC 16 ms
18,648 KB
testcase_09 AC 16 ms
18,696 KB
testcase_10 AC 15 ms
18,688 KB
testcase_11 AC 16 ms
18,692 KB
testcase_12 AC 15 ms
18,672 KB
testcase_13 AC 16 ms
18,672 KB
testcase_14 AC 15 ms
18,688 KB
testcase_15 AC 16 ms
18,728 KB
testcase_16 AC 15 ms
18,540 KB
testcase_17 AC 16 ms
18,672 KB
testcase_18 AC 16 ms
18,680 KB
testcase_19 AC 16 ms
18,652 KB
testcase_20 AC 16 ms
18,652 KB
testcase_21 AC 16 ms
18,728 KB
testcase_22 AC 16 ms
18,656 KB
testcase_23 AC 16 ms
18,696 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
/**
 * No.169 何分かかるの!?
 * 問題文
 *ゆきこちゃんは、大きなサイズのファイルをコピーをしようとしています。
 *
 *コピーに時間がかかるので、しばらくして確認すると
 *「K%完了しました。あとS分かかります。」
 *と表示されていました。
 *
 *ゆきこちゃんは、このファイルコピーに全体で何分かかるか知りたくなりましたが、
 *算数が苦手なので、計算することができません。
 *
 *あなたは、ゆきこちゃんの代わりに全体の処理時間(分)を計算してあげてください。
 *答えは、小数部分の切り捨てをし、整数部分のみを答えてください。
 *
 *時間あたりのコピーの速さは、一定であると仮定する。
 *ゆきこちゃんの見た完了のパーセンテージは小数も表示されるが、ちょうど整数になっていたタイミングであると仮定して良い。
 *入力
 *K
 *S
 *入力はすべて整数で与えられる。
 *1≤K≤99
 *1≤S≤1000000=106
 *
 *Kは%単位であることに注意
 */
$compPer=trim(fgets(STDIN));
$remaMin=trim(fgets(STDIN));
$allMin=floor((float)($remaMin/(100-$compPer)*100));
echo $allMin;


?>
0