编程介的小学生 2017-05-12 01:54 采纳率: 20.5%
浏览 790
已采纳

Sunrise

Compute the fraction of the solar-disc area that is visible at specified times after the onset of sunrise.
This is a two-body problem; there is a single planet and a single star.

Assume a perfectly spherical planet with a radius of 3950 miles. Ignore any possible atmospheric effects on the results to be determined.

At a distance of 92,900,000 miles from the planet's center is an illuminating class four star. For the determinations to be made in this problem, ignore anyphenomena arising from the orbital motion of the planet about the star and consider the illuminating star to be a planar disc. The plane in which the disc lies is perpendicular to the line between the planet center and the solar disc center. The solar disc has a radius of 432,000 miles.

Assume the planet rotates uniformly, making one full rotation in precisely 24 hours.

The sun is centered directly over the planet's equator during the entire revolution of the planet.

Let time be measured from when the first solar rays of the morning reach a given reference point on the equator. For each time value giveninthe input data stream, compute the fraction of the solar disc area that is illuminating this reference point on the equator.

Input

The input time data are given as floating point values measured in seconds. There will be no time-data values less than zero, and none greater than 600. Each line of input will have one floating-point value that should be read using the default float/real input format.

Process the input data stream until the end-of-file is encountered.

Output

Aline with a single real value is to be emitted for each input data value received. This value is to be the fraction of the solar disc (area) that is illuminating the reference point at the given time. The default real/float output format should be used. Non-zero answers must be within 0.1% of the correct answer. If an answer should be zero it must be reported as a value within the interval 0.001.

Sample Input

0.0
600.0

Sample Output

0.000
1.000

  • 写回答

1条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?