結果

問題 No.56 消費税
ユーザー Ryota EnokidoRyota Enokido
提出日時 2018-12-12 09:29:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 409 bytes
コンパイル時間 2,130 ms
コンパイル使用メモリ 74,420 KB
実行使用メモリ 57,824 KB
最終ジャッジ日時 2023-10-25 08:20:43
合計ジャッジ時間 6,825 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
57,560 KB
testcase_01 AC 135 ms
57,616 KB
testcase_02 AC 136 ms
57,308 KB
testcase_03 AC 136 ms
57,640 KB
testcase_04 AC 136 ms
57,604 KB
testcase_05 AC 134 ms
57,560 KB
testcase_06 AC 135 ms
57,560 KB
testcase_07 AC 136 ms
57,668 KB
testcase_08 AC 135 ms
57,604 KB
testcase_09 AC 133 ms
57,276 KB
testcase_10 AC 134 ms
57,332 KB
testcase_11 AC 133 ms
57,612 KB
testcase_12 AC 136 ms
57,672 KB
testcase_13 AC 136 ms
57,312 KB
testcase_14 AC 134 ms
57,604 KB
testcase_15 AC 135 ms
57,676 KB
testcase_16 AC 136 ms
57,616 KB
testcase_17 AC 135 ms
57,556 KB
testcase_18 AC 134 ms
57,744 KB
testcase_19 AC 134 ms
57,612 KB
testcase_20 AC 137 ms
57,612 KB
testcase_21 AC 132 ms
57,580 KB
testcase_22 AC 132 ms
57,596 KB
testcase_23 AC 136 ms
57,620 KB
testcase_24 AC 133 ms
57,824 KB
testcase_25 AC 134 ms
57,748 KB
testcase_26 AC 132 ms
57,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.lang.Math;

    public class Main {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            
            int n = sc.nextInt();
            int d = sc.nextInt();
            double pay = n + n * (d*0.01);
            double anspay = Math.floor(pay);
            System.out.println(Math.round(anspay));
        }
    }
0