結果
| 問題 |
No.262 面白くないビットすごろく
|
| コンテスト | |
| ユーザー |
eigh8_t
|
| 提出日時 | 2015-07-31 23:03:40 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 208 bytes |
| コンパイル時間 | 49 ms |
| コンパイル使用メモリ | 7,680 KB |
| 実行使用メモリ | 19,360 KB |
| 最終ジャッジ日時 | 2024-07-17 23:22:36 |
| 合計ジャッジ時間 | 3,657 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 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 puts count else puts -1 end
eigh8_t