結果

問題 No.687 E869120 and Constructing Array 1
ユーザー ayaaya
提出日時 2019-08-02 13:58:39
言語 PHP
(8.3.4)
結果
TLE  
実行時間 -
コード長 278 bytes
コンパイル時間 46 ms
コンパイル使用メモリ 18,628 KB
実行使用メモリ 23,244 KB
最終ジャッジ日時 2023-09-18 18:12:14
合計ジャッジ時間 2,832 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

<?php
$array=array();
$ans;
$exit=false;
for($i=2;$i<=20;$i++){
  array_push($array,$i);
}
$N=(int)trim(fgets(STDIN));
while($exit===false){
  $random=rand(1,10);
  $exit=array_search($N-$random,$array);
  if($exit!==false){
    $ans=$random." ".($exit+2);
    echo $ans;
  }
}
0