Cinema

Problem Link

Solution by dudu100 pts

Code / Notes

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

int main() {
    int A, B;
    cin >> A >> B;

    int total = 0;
    if (A <= 17) {
        total += 15;
    } else if (A <= 59) {
        total += 30;
    } else {
        total += 20;
    }

    if (B <= 17) {
        total += 15;
    } else if (B <= 59) {
        total += 30;
    } else {
        total += 20;
    }

    cout << total << endl;
}

Last updated 2 weeks, 3 days ago


« Back to problem