编程介的小学生 2019-06-21 09:00 采纳率: 20.5%
浏览 122

根据构建的树进行查找和修改的一个问题,怎么用C语言的程序编写的技术来实现的呢

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

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 matlab yalmip kkt 双层优化问题
    • ¥15 如何在3D高斯飞溅的渲染的场景中获得一个可控的旋转物体
    • ¥88 实在没有想法,需要个思路
    • ¥15 MATLAB报错输入参数太多
    • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
    • ¥15 有赏,i卡绘世画不出
    • ¥15 如何用stata画出文献中常见的安慰剂检验图
    • ¥15 c语言链表结构体数据插入
    • ¥40 使用MATLAB解答线性代数问题
    • ¥15 COCOS的问题COCOS的问题