結果

問題 No.83 最大マッチング
ユーザー yuma25689yuma25689
提出日時 2016-01-02 22:44:30
言語 Perl
(5.40.0)
結果
AC  
実行時間 6 ms / 5,000 ms
コード長 280 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 5,248 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-19 10:39:13
合計ジャッジ時間 671 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
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