2的幂次方表示
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.
Description
任何一个正整数都可以用2的幂次方表示。例如:
137=27+23+20
同时约定方次用括号来表示,即ab可表示为a(b)。由此可知,137可表示为:
2(7)+2(3)+2(0)
进一步:7=22+2+20(21用2表示)
3=2+20
所以最后137可表示为:
2(2(2)+2+2(0))+2(2+2(0))+2(0)
又如:
1315=210+28+25+2+1
所以1315最后可表示为:
2(2(2+2(0))+2)+2(2(2+2(0)))+2(2(2)+2(0))+2+2(0)
## Input Format
一个正整数n(n≤20000)。
## Output Format
一行,符合约定的n的0,2表示(在表示中不能有空格)。
```input1 137
```output1
2(2(2)+2+2(0))+2(2+2(0))+2(0)
2026-5-16递归练习
- Status
- Done
- Rule
- XCPC
- Problem
- 9
- Start at
- 2026-5-16 13:30
- End at
- 2026-5-16 16:30
- Duration
- 3 hour(s)
- Host
- Partic.
- 4