Dieta

Problem Link

Solution by TheRealFertos100 pts

Code / Notes

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

int main() {
    int n, m;
    cin >> n >> m;
    for (int i=0; i<n; i++) {
        int p, g, c;
        cin >> p >> g >> c;
        p=p*4;
        g=g*9;
        c=c*4;
        m-=(p+g+c);
    }
    cout << m;
}

Last updated 1 month, 4 weeks ago


« Back to problem