2022NHOI小甲第六题 找整数(2.7)
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
说明
给出一个整数n, 小明想找到一个最小的整数x, 使得x同时满足如下条件:
(1)x >=n。
(2)存在两个非负整数a和b,使得满足x = a*a*a + a*a*b + a*b*b + b* b*b。
请你帮帮忙。
输入格式
一行,一个整数n,0<=n<=10^18。
输出格式
一个整数,表示满足条件的最小x。
915
提示
【样例解释】
当a=2, b=1时,x=15, 满足x>=9, 且x=15已经是最小的满足条件的了。
来源
单调性 二分查找2022年区赛
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 6
- Start at
- 2025-12-30 15:00
- End at
- 2026-1-7 23:00
- Duration
- 200 hour(s)
- Host
- Partic.
- 32