Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: Bermmmm
Problemset: Market Kalgulator
Language: cpp
Time: 0.003 second
Submitted On: 2025-10-05 11:22:23
#include <bits/stdc++.h>
using namespace std;
int main() {
int n,m,N,rn,rm,realprice,price;
rm = 0;
rn =0;
cin >> N;
price = 0;
for (int i=0;i<N;i++) {
cin >> n;
cin >> m;;
price += (n*m);
rn += n;
}
if(rn >= N*2) {
price = price - (0.03*price);
if (rn > 14 && price > 25) {
price -= 10;
}
}
else if (rn <= 20 && price < 500) {
price += 600;
}
else {
price -= (0.35*N);
}
cout << price;
}