結果

問題 No.688 E869120 and Constructing Array 2
ユーザー tailstails
提出日時 2018-05-18 22:38:28
言語 Perl
(5.38.2)
結果
TLE  
実行時間 -
コード長 156 bytes
コンパイル時間 238 ms
コンパイル使用メモリ 5,212 KB
実行使用メモリ 8,816 KB
最終ジャッジ日時 2023-09-21 19:55:07
合計ジャッジ時間 3,228 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,644 KB
testcase_01 AC 2 ms
4,548 KB
testcase_02 AC 2 ms
4,552 KB
testcase_03 AC 3 ms
4,448 KB
testcase_04 AC 2 ms
4,452 KB
testcase_05 AC 2 ms
4,444 KB
testcase_06 AC 3 ms
4,512 KB
testcase_07 AC 2 ms
4,532 KB
testcase_08 AC 2 ms
4,552 KB
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

$k=<>;
while(!($k&1)){
	$k>>=1;
	++$a;
}
while(1){
	$b=int sqrt$k*2;
	if($k==$b*($b+1)/2){
		print$a+$b+1,$/,"0 "x$a,"1 "x$b,1;
		exit;
	}
	$k<<=1;
	--$a;
}
0