結果
| 問題 |
No.3 ビットすごろく
|
| コンテスト | |
| ユーザー |
StarMatyan
|
| 提出日時 | 2018-07-22 01:47:44 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 632 bytes |
| コンパイル時間 | 176 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 20,992 KB |
| 最終ジャッジ日時 | 2024-12-26 05:07:43 |
| 合計ジャッジ時間 | 32,598 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 WA * 13 TLE * 5 |
ソースコード
targetN = int(input()); kakunin = 1; result = 1; moji = ""; mathu = 0; tyokau = 0; tmpnum = 0; tmpcounter = 0; while targetN != kakunin and result != -1: mathu = 0; data = kakunin; while data >= 1: if data % 2 == 1: mathu = mathu + 1; data = int(data/2); if targetN > 1: kakunin = kakunin + mathu; if targetN > kakunin or targetN == kakunin: result = result + 1; else: kakunin = kakunin - 2 * mathu; if tmpcounter == 0: tmpnum = kakunin; tmpcounter= tmpcounter+1; result = result + 1; tyokau = tyokau + 1; if tyokau > 1 and tmpnum ==kakunin: result = -1; print(result);
StarMatyan