华为OJ: 求小球落地5次后所经历的路程和第5次反弹的高度

来源:互联网 发布:芒果网络机顶盒 编辑:程序博客网 时间:2024/04/29 20:08

  学过自由落体就好,初中物理题。

import java.util.Scanner;public class reboundFiveTimes {public static void main(String args[]){Scanner input=new Scanner(System.in);int k=input.nextInt();double high=k/32.0;double distance=k*23/8.0;System.out.println(distance);System.out.println(high);}}


0 0
原创粉丝点击