Light Distance Calculator


Submit solution

Points: 10 (partial)
Time limit: 1.0s
Memory limit: 64M

Authors:
Problem type
Allowed languages
Java 19, Java 8

題目說明

光在真空中的傳播速度固定為 299,792,458 公尺/秒。 請寫一個 Java 程式,根據使用者輸入的「天數」,計算光在那段時間內大約走了多少公尺。

輸入值的格式

  • days為一個整數,範圍:0 ≤ days ≤ 10000。

  • 僅一行輸入,無其他字元或多餘空白。

輸出值的格式

  • 輸出計算後的總距離(公尺)。

  • 注意:不需要輸出 "公尺" 或其他文字,也不需要千分位逗點,直接印出數字即可。

  • 輸出僅一行,無多餘空白或符號。

sample input1

1

sample output1

25902068371200

解釋:1 天 = 86400 秒,距離 = 299792458 * 86400。


Comments

There are no comments at the moment.