結果
| 問題 |
No.262 面白くないビットすごろく
|
| コンテスト | |
| ユーザー |
eigh8_t
|
| 提出日時 | 2015-07-31 23:05:06 |
| 言語 | Ruby (3.4.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 218 bytes |
| コンパイル時間 | 41 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 19,232 KB |
| 最終ジャッジ日時 | 2024-07-17 23:22:40 |
| 合計ジャッジ時間 | 3,648 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 TLE * 1 -- * 2 |
コンパイルメッセージ
Main.rb:20: warning: ambiguous first argument; put parentheses or a space even after `-' operator Syntax OK
ソースコード
n = gets.to_i sum = 1 i = 1 count = 1 while sum < n i = sum j = 1 while i >= j sum += 1 if j & i > 0 j *= 2 end i += 1 count += 1 flug = true if sum == n end if flug || n == 1 puts count else puts -1 end
eigh8_t