結果

問題 No.56 消費税
ユーザー cheeeese
提出日時 2021-06-28 13:32:35
言語 Java
(openjdk 23)
結果
AC  
実行時間 153 ms / 5,000 ms
コード長 421 bytes
コンパイル時間 2,462 ms
コンパイル使用メモリ 74,632 KB
実行使用メモリ 54,436 KB
最終ジャッジ日時 2024-06-25 12:09:51
合計ジャッジ時間 7,855 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

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