結果

問題 No.56 消費税
ユーザー megane_ankomegane_anko
提出日時 2021-02-18 00:42:05
言語 TypeScript
(5.7.2)
結果
AC  
実行時間 65 ms / 5,000 ms
コード長 418 bytes
コンパイル時間 8,176 ms
コンパイル使用メモリ 228,460 KB
実行使用メモリ 41,200 KB
最終ジャッジ日時 2024-12-31 16:27:42
合計ジャッジ時間 10,515 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import * as fs from 'fs';
const input = fs.readFileSync('/dev/stdin', 'utf8');

const arr = input.split(' ');
let D = parseInt(arr[0]);
let p = parseInt(arr[1]) / 100;
//console.log(p);

//定価 * 消費税の小数点以下切りすて
//console.log(D * (1 + p));//この小数点処理ができず詰んだ
//let result = Math.floor(D * (1 + p));
let result = Math.floor(D + D * 100 * p / 100);
console.log(result);
0