結果

問題 No.56 消費税
ユーザー oyafusooyafuso
提出日時 2019-03-11 17:13:30
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 731 bytes
コンパイル時間 2,100 ms
コンパイル使用メモリ 72,652 KB
実行使用メモリ 56,284 KB
最終ジャッジ日時 2023-09-05 20:13:43
合計ジャッジ時間 6,392 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,628 KB
testcase_01 AC 121 ms
55,768 KB
testcase_02 AC 122 ms
55,776 KB
testcase_03 WA -
testcase_04 AC 121 ms
55,816 KB
testcase_05 AC 122 ms
55,572 KB
testcase_06 AC 121 ms
55,684 KB
testcase_07 AC 120 ms
55,712 KB
testcase_08 AC 119 ms
56,128 KB
testcase_09 AC 118 ms
55,752 KB
testcase_10 AC 119 ms
55,820 KB
testcase_11 AC 120 ms
55,788 KB
testcase_12 AC 120 ms
55,444 KB
testcase_13 AC 121 ms
55,756 KB
testcase_14 AC 123 ms
55,464 KB
testcase_15 AC 123 ms
55,836 KB
testcase_16 AC 121 ms
56,284 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {

	private static final String SPLIT_STR = " ";

	public static void main(String[] args) {
		// Scanner生成
		Scanner sc = new Scanner(System.in);
		// 入力設定
		String input = sc.nextLine();
		String[] split = input.split(SPLIT_STR);
		List<Integer> numList = new ArrayList<>(split.length);
		for (int i = 0; i < split.length; i++) {
			numList.add(Integer.parseInt(split[i]));
		}
		// Scannerクローズ
		sc.close();

		/* メイン処理開始 */
		// 変数初期化
		int result = 0;
		int D = numList.get(0);
		int P = numList.get(1);
		// 結果設定
		result = (int)(D * (1 + (double)P / 100));
		/* メイン処理終了 */

		// 結果出力
		System.out.println(result);
	}
}
0