Green Boy Can't You Solve It Out? Ep. 3
思考题 born from a weird hardware
Innovative Hardware
Given an integer n, find such n_1+n_2+n_3=n or report impossible.
Where n_1, n_2\in {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
20,24,28,32,36,40,44,48,52,56,60,64} and n_3\in{ 0,1,2,3,4,5,6,7,8,12,16,20,24,28}.
In other words, n_1, n_2 can be integer 1-16 or the multiple of 4 times 1-16.
Pay attention that n_1, n_2 cannot be zero.
Example
If n=37 then n_1=1, n_2=36,n_3=0 is a possible answer.
Constraints
Can you do it without table lookup and no iteration?
Solution
Ask LLM
版权声明:
作者:XGN
链接:https://blog.hellholestudios.top/archives/2098
来源:Hell Hole Studios Blog
文章版权归作者所有,未经允许请勿转载。

共有 0 条评论