結果

問題 No.350 d=vt
ユーザー kenji_shioyakenji_shioya
提出日時 2016-06-02 18:19:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 174 ms / 2,000 ms
コード長 486 bytes
コンパイル時間 3,977 ms
コンパイル使用メモリ 80,252 KB
実行使用メモリ 42,052 KB
最終ジャッジ日時 2024-04-15 10:33:28
合計ジャッジ時間 7,543 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 166 ms
41,820 KB
testcase_01 AC 167 ms
41,928 KB
testcase_02 AC 167 ms
41,648 KB
testcase_03 AC 163 ms
41,816 KB
testcase_04 AC 171 ms
41,908 KB
testcase_05 AC 170 ms
41,764 KB
testcase_06 AC 166 ms
41,812 KB
testcase_07 AC 168 ms
41,588 KB
testcase_08 AC 167 ms
41,776 KB
testcase_09 AC 168 ms
41,532 KB
testcase_10 AC 168 ms
41,856 KB
testcase_11 AC 174 ms
41,660 KB
testcase_12 AC 170 ms
42,052 KB
testcase_13 AC 170 ms
41,732 KB
testcase_14 AC 169 ms
41,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.text.*;

public class Exercise49{
  public static void main (String[] args){

    Scanner sc = new Scanner(System.in);

    double v = sc.nextDouble() + 0.00001;
    int t = sc.nextInt();

    DecimalFormat df = new DecimalFormat("#.#####");

    String numStr = df.format(v);
    String x = numStr.substring(2, 6);
    String trimedStr = x.replaceFirst("^0+", "");
    int vd = Integer.parseInt(trimedStr);

    System.out.println(vd * t / 10000);
  }
}
0