zoj 2330

一道数学题,两边同取对数后,alnb = blna    ==> lnb/b = lna/a

且a,b分布于x = e的两侧,这是对x/lnx求导得出其单调性的结果

所以a大于e就无解,小于e就在e的左侧二分,上限是根据a>=1.1算出的在e右侧的相应的点

A^B == B^A?

 

 


 

Time Limit: 1 Second      Memory Limit: 32768 KB

 


 

Solve the equation in the name of this problem.

Input

There are several cases. Each of them has a single real number as the smaller one of a and b in the equation on a separate line. You may assume it's no smaller than 1.1. Proceed until the end of file.

Output

For each case, print the other number on a single line. Keep 5 digits after decimal point. If no such number exists, print -1.

Sample Input

2
10

Sample Output

4.00000
-1

 

代码

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值