結果

問題 No.83 最大マッチング
ユーザー 綾地寧々綾地寧々
提出日時 2015-06-03 16:23:19
言語 PHP
(8.3.4)
結果
AC  
実行時間 87 ms / 5,000 ms
コード長 163 bytes
コンパイル時間 57 ms
コンパイル使用メモリ 18,784 KB
実行使用メモリ 18,928 KB
最終ジャッジ日時 2023-09-20 18:59:21
合計ジャッジ時間 1,109 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
18,876 KB
testcase_01 AC 15 ms
18,852 KB
testcase_02 AC 15 ms
18,684 KB
testcase_03 AC 15 ms
18,848 KB
testcase_04 AC 15 ms
18,688 KB
testcase_05 AC 16 ms
18,900 KB
testcase_06 AC 15 ms
18,908 KB
testcase_07 AC 16 ms
18,820 KB
testcase_08 AC 15 ms
18,716 KB
testcase_09 AC 23 ms
18,868 KB
testcase_10 AC 65 ms
18,900 KB
testcase_11 AC 85 ms
18,928 KB
testcase_12 AC 87 ms
18,848 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$n = trim(fgets(STDIN));
if ( $n % 2 ) {
	echo "7";
}
for ( $i=0; $i < (($n % 2) ? (floor($n / 2) - 1) : floor($n / 2)); $i++ ) {
	echo "1";
}
echo PHP_EOL;
0