結果
| 問題 |
No.688 E869120 and Constructing Array 2
|
| ユーザー |
tails
|
| 提出日時 | 2018-05-18 22:41:16 |
| 言語 | Perl (5.40.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 1,000 ms |
| コード長 | 191 bytes |
| コンパイル時間 | 43 ms |
| コンパイル使用メモリ | 5,248 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-07 13:28:09 |
| 合計ジャッジ時間 | 818 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
$k=<>;
if($k==0){
print"1\n0";
exit;
}
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;
}
tails