結果
| 問題 |
No.56 消費税
|
| コンテスト | |
| ユーザー |
Gchansanjou
|
| 提出日時 | 2018-02-11 18:44:06 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 56 ms / 5,000 ms |
| コード長 | 665 bytes |
| コンパイル時間 | 3,865 ms |
| コンパイル使用メモリ | 73,776 KB |
| 実行使用メモリ | 37,424 KB |
| 最終ジャッジ日時 | 2024-11-17 11:03:46 |
| 合計ジャッジ時間 | 5,893 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 23 |
ソースコード
package yukiCoder;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class No00056 {
public static void main(String[] args) {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
String[] input = new String[2];
try {
input = bufferedReader.readLine().split(" ");
Long cost = Long.parseLong(input[0]);
double tax = Double.parseDouble(input[1]) * 0.01;
System.out.println(calculation(cost, tax));
} catch (IOException e) {
e.printStackTrace();
}
}
public static Long calculation(long cost, double tax) {
return (long) (cost + cost * tax);
}
}
Gchansanjou