Menu
Coddy logo textTech

Football

Lesson 25 of 32 in Coddy's Coding Problems course.

challenge icon

Challenge

Hard

In the games of football, the winner is awarded 3 points, the loser is not awarded any points and if the match is a draw, both teams get 1 point each. 

 

Write a program that gets a natural number N from input. In the next N lines there are three numbers W, D, L representing the wins, draws and loses of the specific team respectively. Output the number of points that the team with most points has.

 

Input
3
4 0 1
2 0 2
0 1 4

Output
12

Try it yourself

#include <stdio.h>

int main() {
    // Write code here
    return 0;
}

All lessons in Coding Problems