結果
問題 |
No.56 消費税
|
ユーザー |
|
提出日時 | 2020-07-23 13:40:09 |
言語 | JavaScript (node v23.5.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 414 bytes |
コンパイル時間 | 216 ms |
コンパイル使用メモリ | 6,944 KB |
実行使用メモリ | 41,464 KB |
最終ジャッジ日時 | 2024-06-23 17:32:13 |
合計ジャッジ時間 | 2,853 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 16 WA * 7 |
ソースコード
function main(input = ``) { let lines = input.split('\n'); let [price, taxRate] = lines[0].split(' ').map((val) => parseInt(val)); return `${Math.ceil(Math.round(price * (1 + taxRate / 100), 3))}`; } const { readFileSync, existsSync } = require('fs'); const stdin = '/dev/stdin'; if (existsSync(stdin)) { const input = readFileSync(stdin, 'utf8'); console.log(main(input)); } module.exports = main;