poj 1005

更新时间:2023-05-15 16:59:43 阅读: 评论:0

通过率:41%        难度:简单定冠词和不定冠词
I Think I Need a Houboat
Time Limit: 1000MS
boer
Memory Limit: 10000K
Total Submissions: 53024
Accepted: 21859
Description
Fred Mapper is considering purchasing some land in Louisiana to build his hou on. In the process of investigating the land, he learned that the state of Louisiana is actually shrinking by 50 square miles each year, due to erosion caud by the Mississippi River. Since Fred is hoping to live in this hou the rest of his life, he needs to know if his land is going to be lost to erosion.

enter是什么意思After doing more rearch, Fred has learned that the land that is being lost forms a micircle. This micircle is part of a circle centered at (0,0), with the line that bicts the circle being the X axis. Locations below the X axis are in the water. The micircle has an area of 0 at the beginning of year 1. (Semicircle illustrated in the Figure.) accountant
Inputghh
The first line of input will be a positive integer indicating how many data ts will be included (N). Each of the next N lines will contain the X and Y Cartesian coordinates of the land Fred is considering. The will be floating point numbers measured in miles. The Y coordinate will be non-negative. (0,0) will not be given.
Output
For each data t, a single line of output should appear. This line should take the form of: “Property N: This property will begin eroding in year Z.” Where N is the data t (counting from 1), and Z is the first year (start from 1) this property will be within the micircle AT THE END OF YEAR Z. Z must be an integer. After the last data t, this should print out “END OF OUTPUT.”
Sample Input
2
1.0 1.0
25.0 0.0
Sample Output
六级成绩查询 身份证Property 1: This property will begin eroding in year 1.
Property 2: This property will begin eroding in year 20.
END OF OUTPUT.
新视野大学英语mp3翻译:佛瑞德考虑要在美国路易斯安那州上购买一些地来修建他的房子。在调查这个陆地的过程中,他发现路易斯安那州每年都因密西西比河的侵蚀而萎缩50平方英里。自从佛瑞德打算要在这里度过后半生起,他就需要知道他的地是否会被侵蚀掉。
做了一些调查后,佛瑞德发现这里的陆地被以半圆的形式被侵蚀。这个半圆是一个圆的一部分,圆心为(0,0),被横坐标轴而等分,横坐标轴x轴下面的部分在水里。这个半圆在第一年的时候的面积是0。
第一行输入的是数据集的数目(N),接下来的N行,每一行将包括佛瑞德居住的x,y笛卡尔坐标。这些坐标都是浮点型英里单位数据。且y坐标是非负的,不会出现(0,0)的情况。
对于每个数据集,需要输出一行信息,这行信息应该以格式“Property N: This property will begin eroding in year Z”N是数据集的序列,Z是佛瑞德的居住地开始被侵蚀的年份。最后
英孚英语培训费用一行数据集的输出完成后输出“END OF OUTPUT.”
解题思路:以半圆的坐标远点到居住地的距离为半径,求半圆的面积,求得面积后除以50,取整数,加1,输出该数据即可
总结及出错情况:该题较为简单,只要读懂了题就很容易做出来,注意在定义数据类型时易出错,坐标应是浮点型就好了
代码:
植树节英文#include<stdio.h>
#include<stdlib.h>
int main()
百业会计{
    int i,N,year;
    float x,y,pi=3.1415926;
    scanf("%d",&N);
    for(i=0;i<N;i++)
    {
      float area;
      scanf("%f%f",&x,&y);
      area=0.5*pi*(x*x+y*y);
      year=area/50;
      if(y>=0)
      printf("Property %d: This property will begin eroding in year %d.\n",i+1,year+1);
    }
    printf("END OF OUTPUT.");
    system("pau");
    return 0;
}
     

本文发布于:2023-05-15 16:59:43,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/90/109576.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图