結果
問題 | No.8055 2019(注:異常な難易度です) |
ユーザー |
|
提出日時 | 2020-10-26 18:10:12 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 92 ms / 2,000 ms |
コード長 | 237 bytes |
コンパイル時間 | 176 ms |
コンパイル使用メモリ | 7,296 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-07-21 21:29:47 |
合計ジャッジ時間 | 10,013 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 91 |
コンパイルメッセージ
Syntax OK
ソースコード
k=0s=0n=gets.to_iwhile s<nk+=1s+=(k-2)*(k-1)/2+1end(p 2**k-1;exit)if s==ns-=(k-2)*(k-1)/2+1m=k-2i=0while s<nif s+m-i>=np ('1'*(i+1)+'0'*(s+m-i-n+1)+'1'*(k-i-1-(s+m-i-n+1))).to_i(2)breakelses+=m-ii+=1endend