結果

問題 No.83 最大マッチング
ユーザー yuma25689yuma25689
提出日時 2016-01-02 22:44:30
言語 Perl
(5.38.2)
結果
AC  
実行時間 8 ms / 5,000 ms
コード長 280 bytes
コンパイル時間 47 ms
コンパイル使用メモリ 5,336 KB
実行使用メモリ 5,412 KB
最終ジャッジ日時 2023-10-19 14:30:50
合計ジャッジ時間 762 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
5,304 KB
testcase_01 AC 3 ms
5,304 KB
testcase_02 AC 3 ms
5,304 KB
testcase_03 AC 4 ms
5,304 KB
testcase_04 AC 4 ms
5,304 KB
testcase_05 AC 4 ms
5,304 KB
testcase_06 AC 4 ms
5,304 KB
testcase_07 AC 4 ms
5,304 KB
testcase_08 AC 4 ms
5,304 KB
testcase_09 AC 4 ms
5,316 KB
testcase_10 AC 6 ms
5,388 KB
testcase_11 AC 7 ms
5,412 KB
testcase_12 AC 8 ms
5,412 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

$stickCount=<STDIN>;
chomp($stickCount);

$digitCount = int($stickCount / 2);
$rest = $stickCount % 2;
$lastEqualSeven = (0<$rest);


$strCount = "1";
if( $lastEqualSeven )
{
	$strCount = "7";
}
for( $i=1; $i < $digitCount; $i++ )
{
	$strCount .= "1";
}

print("${strCount}\n");

0