結果
| 問題 | No.56 消費税 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-01 18:18:22 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 466 bytes |
| 記録 | |
| コンパイル時間 | 522 ms |
| コンパイル使用メモリ | 94,732 KB |
| 実行使用メモリ | 11,944 KB |
| 最終ジャッジ日時 | 2026-07-04 09:01:27 |
| 合計ジャッジ時間 | 1,438 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}