結果
| 問題 |
No.56 消費税
|
| ユーザー |
|
| 提出日時 | 2020-07-23 13:47:04 |
| 言語 | JavaScript (node v23.5.0) |
| 結果 |
AC
|
| 実行時間 | 67 ms / 5,000 ms |
| コード長 | 413 bytes |
| コンパイル時間 | 229 ms |
| コンパイル使用メモリ | 5,632 KB |
| 実行使用メモリ | 39,424 KB |
| 最終ジャッジ日時 | 2024-06-23 17:33:05 |
| 合計ジャッジ時間 | 3,230 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 23 |
ソースコード
function main(input = ``) {
let lines = input.split('\n');
let [price, taxRate] = lines[0].split(' ').map((val) => parseInt(val));
return `${Math.floor((price * (1 + taxRate / 100)).toFixed(2))}`;
}
const { readFileSync, existsSync } = require('fs');
const stdin = '/dev/stdin';
if (existsSync(stdin)) {
const input = readFileSync(stdin, 'utf8');
console.log(main(input));
}
module.exports = main;