結果
| 問題 |
No.56 消費税
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-01 18:18:22 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 466 bytes |
| コンパイル時間 | 686 ms |
| コンパイル使用メモリ | 73,940 KB |
| 最終ジャッジ日時 | 2025-02-20 18:58:28 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 23 |
ソースコード
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
int main() {
string first_line;
getline(cin, first_line);
stringstream ss(first_line);
vector<int> cost_and_tax_rate;
int num;
while (ss >> num) {
cost_and_tax_rate.push_back(num);
}
int cost = cost_and_tax_rate[0];
int tax_rate = cost_and_tax_rate[1];
int tax = cost * tax_rate / 100;
cout << cost + tax << endl;
return 0;
}