제출 #1110683

#제출 시각아이디문제언어결과실행 시간메모리
1110683vjudge1Tuna (COCI17_tuna)C++17
0 / 50
1 ms336 KiB
#include <bits/stdc++.h>
using namespace std;

int main()
{
    int t;
    int top = 0;
    cin>>t;
    for (int n = 0; n < t; ++n)
    {
        int a,b;
        cin>>a>>b;
        if (abs(a-b)>2)
        {
            int yeni;
            cin>>yeni;
            top += yeni;
        }
        else
        {
            if (a>b)
            {
                top += a;
            }
            else
            {
                top+=b;
            }
            
            
        }
        
        
    }
    cout<<top<<endl;
    
}
#Verdict Execution timeMemoryGrader output
Fetching results...