結果

問題 No.285 消費税2
ユーザー samplelpmassamplelpmas
提出日時 2017-05-13 19:38:15
言語 Java21
(openjdk 21)
結果
AC  
実行時間 166 ms / 2,000 ms
コード長 369 bytes
コンパイル時間 1,981 ms
コンパイル使用メモリ 73,172 KB
実行使用メモリ 58,832 KB
最終ジャッジ日時 2023-10-13 16:19:20
合計ジャッジ時間 7,079 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 139 ms
56,996 KB
testcase_01 AC 138 ms
56,824 KB
testcase_02 AC 138 ms
56,924 KB
testcase_03 AC 139 ms
56,964 KB
testcase_04 AC 139 ms
56,780 KB
testcase_05 AC 137 ms
56,792 KB
testcase_06 AC 135 ms
56,988 KB
testcase_07 AC 136 ms
58,828 KB
testcase_08 AC 138 ms
56,900 KB
testcase_09 AC 140 ms
56,904 KB
testcase_10 AC 136 ms
58,832 KB
testcase_11 AC 135 ms
56,976 KB
testcase_12 AC 130 ms
56,824 KB
testcase_13 AC 145 ms
56,828 KB
testcase_14 AC 139 ms
56,940 KB
testcase_15 AC 144 ms
56,904 KB
testcase_16 AC 140 ms
56,544 KB
testcase_17 AC 138 ms
56,952 KB
testcase_18 AC 139 ms
56,964 KB
testcase_19 AC 140 ms
57,092 KB
testcase_20 AC 139 ms
57,044 KB
testcase_21 AC 145 ms
56,572 KB
testcase_22 AC 139 ms
56,992 KB
testcase_23 AC 139 ms
56,848 KB
testcase_24 AC 139 ms
55,032 KB
testcase_25 AC 166 ms
56,776 KB
testcase_26 AC 137 ms
56,564 KB
testcase_27 AC 138 ms
57,004 KB
testcase_28 AC 140 ms
56,660 KB
testcase_29 AC 135 ms
56,880 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