ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2100. Wedding Dinner

C++ answer
Posted by gleb@il 26 Nov 2019 00:19
#include <iostream>
#include <string>
using namespace std;
int main()
{
    int n,g=2;
    cin >> n;
    for(int i = 0; i < n; i++)
    {
        string a;
        cin >> a;
        if(a.length() > 4 && a.substr(a.length()-4,a.length()-1) == "+one")
            g+=2;
        else
            g++;
    }
    if(g == 13)
        cout << 1400;
    else
        cout << g*100;
}