System Testing
78 / 78
AC
78/78 test cases passed
Submission #23
| Problem | ValueAddedTax |
|---|---|
| Handle | guest-4b546a62 |
| Submitted | 2026-07-19 15:32:25 |
Source Code
// g++ -std=c++17 a.cpp -o a; ./a
#include <iostream>
#include <vector>
#include <string>
using namespace std;
#define ll long long
const int INF = 1e9;
const ll LINF = 1e18;
class ValueAddedTax {
public:
double calculateFinalPrice(string product, int price, vector<string> food)
{
for (int i=0;i<food.size();i++) {
if (product == food[i]) {
return (double) price + (double)price*0.1;
}
}
return (double) price + (double)price*0.18;
}
};