Submission

Status:

----------

Subtask/Task Score:

0/100

Score: 0

User: Bermmmm

Problemset: Market Kalgulator

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-05 11:02:22

#include <bits/stdc++.h>
using namespace std;

int main() {
    int n,m,N,price,rn,rm,realprice;
    rn=0;
    rm = 0;
    cin >> N;
    price = 0;

    for (int i=0;i<N;i++) {
        cin >> n;
        cin >> m;;
        price += (n*m);
        rn += n;
    }


    if(rn %2 == 0) {
        price = price - ((3/100)*price);
        if (rn > 14 && price > 25) {
            price -= 10;
        }
    }

    if(rn <= 20 && price < 500) {
        price += 600;
    }

    else if (rn %2 != 0 && rn > 20) {
        price *= 0.35;
    }

    cout << price;
}