Equation Again Maximum Minimum value

Source: Internet
Author: User

Equation AgainTime limit:1000MS Memory Limit:32768KB 64bit IO Format:%i64d &%i64 U SubmitStatus

Description

This problem's author is too lazy-to-write the problem description, so he only give you a equation like x (ey) = = (ey) x, And the value of Y, your task is calculate the value of X.
Note:here e is the Natural logarithm.

Input

Each line would contain one number Y (y >= 1). Process to end of file.

Output

For each case, output X on one line, accurate to five decimal places, if there is many answers, output them in increasing Order, if there is no answer, just output "Happy to women ' s day!".

Sample Input

1

Sample Output

2.71828
1#include <stdio.h>2#include <math.h>3 4 Const Doubleinf=0x3f3f3f3f;5 Const Doubles=1e-9;6 Const DoubleE=exp (1);7 Doubley,y;8 9 BOOLCDoublex)Ten { One     if(log (x)///) < (log (e*y)/(e*y ))) A         return true; -     Else -         return false; the } -  - intMain () - { +     inti,j; -      while(SCANF ("%LF", &y)! =EOF) +     { A         Doubley= (log (e*y)/(e*y)); at         if(y==1.0) -printf"%.5lf\n", e); -         Else if(Y> (log (e)/e)) -         { -printf"Happy to women ' s day!\n"); -         } in         Else -         { to             Doublelb=1.0, ub=e; +              for(i=1; i<= +; i++) -             { the                 DoubleMid= (LB+UB)/2; *                 if(C (mid)) $lb=mid;Panax Notoginseng                 Else -ub=mid; the             } +printf"%.5LF", UB); Alb=e,ub=INF; the              for(i=1; i<= +; i++) +             { -                 DoubleMid= (LB+UB)/2; $                 if(C (mid)) $ub=mid; -                 Else -lb=mid; the             } -printf"%.5lf\n", LB);Wuyi  the         } -     } Wu     return 0; -}
View Code

Equation Again Maximum Minimum value

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.