結果
問題 |
No.1585 Cubic Number
|
ユーザー |
![]() |
提出日時 | 2025-03-20 20:16:27 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 38 ms / 1,000 ms |
コード長 | 277 bytes |
コンパイル時間 | 294 ms |
コンパイル使用メモリ | 82,160 KB |
実行使用メモリ | 53,688 KB |
最終ジャッジ日時 | 2025-03-20 20:17:02 |
合計ジャッジ時間 | 2,258 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
n = int(input()) low = 1 high = 10**6 found = False while low <= high: mid = (low + high) // 2 cube = mid ** 3 if cube == n: found = True break elif cube < n: low = mid + 1 else: high = mid - 1 print("Yes" if found else "No")