编程介的小学生
2017-12-01 18:02Mod Tree
Problem Description
The picture indicates a tree, every node has 2 children.
The depth of the nodes whose color is blue is 3; the depth of the node whose color is pink is 0.
Now out problem is so easy, give you a tree that every nodes have K children, you are expected to calculate the minimize depth D so that the number of nodes whose depth is D equals to N after mod P.
Input
The input consists of several test cases.
Every cases have only three integers indicating K, P, N. (1<=K, P, N<=10^9)
Output
The minimize D.
If you can’t find such D, just output “Orz,I can’t find D!”
Sample Input
3 78992 453
4 1314520 65536
5 1234 67
Sample Output
Orz,I can’t find D!
8
20
- 点赞
- 回答
- 收藏
- 复制链接分享
1条回答
为你推荐
- golang测试错误:在以下任何位置都找不到软件包“ github.com/stretchr/testify/assert”:
- it技术
- 互联网问答
- IT行业问题
- 计算机技术
- 编程语言问答
- 1个回答
- 从Yaml文件中删除属性
- type-conversion
- struct
- 2个回答
- 转到:具有接口的结构的动态类型强制转换/断言(以调用方法并使用结构公用)
- reflection
- revel
- 4个回答
- PHP的main.c如何开始执行
- c
- c++
- php
- 3个回答
- 安装php5-geoip失败
- php
- 1个回答
换一换