結果

問題 No.285 消費税2
ユーザー samplelpmassamplelpmas
提出日時 2017-05-13 19:28:50
言語 Java19
(openjdk 21)
結果
AC  
実行時間 162 ms / 2,000 ms
コード長 369 bytes
コンパイル時間 2,058 ms
コンパイル使用メモリ 72,760 KB
実行使用メモリ 57,352 KB
最終ジャッジ日時 2023-10-13 16:19:06
合計ジャッジ時間 7,785 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 140 ms
56,840 KB
testcase_01 AC 140 ms
56,612 KB
testcase_02 AC 135 ms
54,528 KB
testcase_03 AC 134 ms
56,640 KB
testcase_04 AC 142 ms
56,904 KB
testcase_05 AC 146 ms
56,740 KB
testcase_06 AC 140 ms
56,636 KB
testcase_07 AC 142 ms
56,996 KB
testcase_08 AC 141 ms
57,160 KB
testcase_09 AC 141 ms
56,644 KB
testcase_10 AC 139 ms
56,720 KB
testcase_11 AC 145 ms
56,816 KB
testcase_12 AC 161 ms
56,872 KB
testcase_13 AC 156 ms
56,720 KB
testcase_14 AC 161 ms
56,924 KB
testcase_15 AC 160 ms
56,584 KB
testcase_16 AC 147 ms
56,564 KB
testcase_17 AC 144 ms
56,996 KB
testcase_18 AC 159 ms
57,140 KB
testcase_19 AC 155 ms
56,544 KB
testcase_20 AC 152 ms
57,176 KB
testcase_21 AC 145 ms
54,664 KB
testcase_22 AC 141 ms
56,520 KB
testcase_23 AC 139 ms
56,972 KB
testcase_24 AC 138 ms
57,068 KB
testcase_25 AC 138 ms
57,072 KB
testcase_26 AC 138 ms
57,004 KB
testcase_27 AC 141 ms
56,920 KB
testcase_28 AC 141 ms
57,352 KB
testcase_29 AC 162 ms
57,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        long d = sc.nextLong();

        d *= 108;

        long integerPart = d / 100;
        long fractionalPart = d % 100;

        System.out.println(integerPart + "." + fractionalPart / 10 + fractionalPart % 10);

    }

}
0