Cinema

Problem Link

Solution by JAPAMISTERIOSO100 pts

Code / Notes

// Source: https://usaco.guide/general/io

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

int main() {
int x , y, a, b;
cin >> x >> y;

if (x == 0){
    a = 0;
}else {
if (x < 18 ){
     a = 15;
}else {
    if (x > 60 ){
     a = 20;
}else ( a = 30);}}
if (x == 0){
    a = 0;
}else {
    if (y < 18 ){
     b = 15;
}else {
    if (y > 60 ){
     b = 20;
}else ( b = 30);}}
cout << a + b;
}

Last updated 2 weeks, 3 days ago


« Back to problem