zoukankan      html  css  js  c++  java
  • nullnullhdu2134(切蛋糕)

    本文是一篇关于nullnull的帖子

        

    Problem Description

        

    Ice cream took a bronze medal in the Beijing match. Liu sir is very very happy. So he buys a cake for them. kiki is a child who likes eating, so the task of cuting cake was given to kiki. kiki is also a mischievous child. She wants to cut the cake in a different way. This is introduced in the figure below.
    null和null

    But there is a difficult problem.which is how to make each preson get equally many cake. kiki is not good at match, so she wants you help her solve this problem.

        

     

        

    Input

        

    Input contains multiple test cases. Each line is a case. Each case contains only one integer R which is the radius. The input is terminated with a R of 0.

        

     
        每日一道理
    流逝的日子像一片片凋零的枯叶与花瓣,渐去渐远的是青春的纯情与浪漫。不记得曾有多少雨飘在胸前风响在耳畔,只知道沧桑早已漫进了我的心爬上了我的脸。当一个人与追求同行,便坎坷是伴,磨难也是伴。

        

    Output

        

    For each test case, you should printf two numbers r2 and r1 in a line, accurate up to 3 decimal places, separate them by one space.

        

     

        

    Sample Input
    10 15 5 25 0
     

        

    Sample Output
    5.774 8.165
    8.660 12.247
    2.887 4.082
    14.434 20.412
    #include<stdio.h>
    #include<math.h>
    int main()
    {
        double R,r1,r2;
        while (scanf("%lf",&R)==1&&R)
        {
            r2=R*sqrt(2.0/3);
            r1=R*sqrt(1.0/3);
            printf("%.3lf %.3lf\n",r1,r2);
        }
        return 0;
    }

        
     

    文章结束给大家分享下程序员的一些笑话语录: 《诺基亚投资手机浏览器UCWEB,资金不详或控股》杯具了,好不容易养大的闺女嫁外国。(心疼是你养的吗?中国创业型公司创业初期哪个从国有银行贷到过钱?)

  • 相关阅读:
    测试Leader应该做哪些事
    软件测试基础理论详解
    测试用例设计方法--场景分析法详解
    测试用例设计方法--因果图法、判断表法详解
    测试用例设计方法--正交试验法详解
    jira创建仪表盘以及对应的数据用二维表显示
    如何对PyCharm进行设置
    selenium+python自动化测试环境安装
    卸载loadrunner
    通过抓包工具(fiddler)获取手机app/微信的网络信息
  • 原文地址:https://www.cnblogs.com/jiangu66/p/3093767.html
Copyright © 2011-2022 走看看