結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
23,160 KB
testcase_01 AC 15 ms
18,696 KB
testcase_02 AC 16 ms
18,572 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(2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20);
$ans;
$exit=false;
$N=(int)trim(fgets(STDIN));
while($exit===false){
  $random=2;
  $exit=array_search($N-$random,$array);
  if($exit!==false){
    $ans=$random." ".($exit+2);
    echo $ans;
  }
}
0