結果

問題 No.56 消費税
ユーザー cheeeese
提出日時 2021-06-28 12:46:35
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 413 bytes
コンパイル時間 2,228 ms
コンパイル使用メモリ 74,536 KB
実行使用メモリ 54,296 KB
最終ジャッジ日時 2024-06-25 12:09:00
合計ジャッジ時間 6,875 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 13 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main (String[] args) {
		Scanner scanner = new Scanner(System.in);
		double D = scanner.nextInt();
		double P = scanner.nextInt();

		if(D < 1 || D > Math.pow(10, 7) || P < 0 || P > 100) {
			System.out.println("Please input D between 1 and 10000000, and input P between 0 and 100");
		} else {
			System.out.println((int)(D*(1+P/100)));
		}
	}
}
0