結果

問題 No.809 かけ算
ユーザー aya
提出日時 2019-08-05 12:30:39
言語 PHP
(843.2)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 318 bytes
コンパイル時間 187 ms
コンパイル使用メモリ 32,148 KB
実行使用メモリ 31,536 KB
最終ジャッジ日時 2024-07-18 13:29:52
合計ジャッジ時間 1,039 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
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