結果

問題 No.809 かけ算
ユーザー ayaaya
提出日時 2019-08-05 12:30:39
言語 PHP
(8.3.4)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 318 bytes
コンパイル時間 212 ms
コンパイル使用メモリ 18,672 KB
実行使用メモリ 18,920 KB
最終ジャッジ日時 2023-09-25 17:11:21
合計ジャッジ時間 1,060 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
18,804 KB
testcase_01 AC 16 ms
18,832 KB
testcase_02 AC 16 ms
18,732 KB
testcase_03 AC 16 ms
18,836 KB
testcase_04 AC 16 ms
18,592 KB
testcase_05 AC 16 ms
18,816 KB
testcase_06 AC 16 ms
18,920 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$input=(int)trim(fgets(STDIN));
$st = microtime(true);
$ans;
$array=array();
for($i=1;$i<($input/2)+1;$i++){
  $now = microtime(true); 
  $time=$now-$st;
  if($time>0.0005){
   break;
  }
  if($input%$i==0){
    $x=$input/$i;
    array_push($array,"$i $x");
  }
}
$ans=$array[rand(0,count($array)-1)];
echo $ans;
0