문제
In a lot of places in the world, elite universities come in pairs and their students like to challenge each other every year. In England, Oxford and Cambridge are famous for The Boat Race, an annual rowing race that opposes them. In Switzerland, students from Zürich and Lausanne battle in a famous annual ski challenge.
TelecomParisTech and Eurecom, two famous French schools, are also planning to organize a multi-sport tournament. They have already agreed on the choice of sports and the rules of the game, but the only point of disagreement is on where the contest should be hosted. Indeed, every school has been bragging for years about the wonderful sport facilities that they have.
At last, it was agreed that the competition would be hosted at the school which has the larger rectangular sports field. The only thing left is to determine which school this is: given the size of the fields, determine which school has the field with the larger surface.
입력
The input consists of several test cases. The first line contains an integer indicating the number of test cases. Each test case follows. Each test case consists of a single line containing 4 integers 1 ≤ lt, wt, le, we ≤ 109 separated by single spaces: lt and wt represent the length and width of the sports field of TelecomParisTech, and le and we represent the length and width of the sports field at Eurecom.
출력
For each test case in the input, your program should produce one line. The contents of the line should be the name of the school that has the facility with the larger area: TelecomParisTech or Eurecom. In case of a tie, the contents of the line should be Tie. There should be no blank lines in your output.
Solved.ac 레벨
브론즈 V
풀이
t = int(input())
for i in range(t):
lt, wt, le, we = map(int, input().split())
if((lt * wt) > (le * we)):
print("TelecomParisTech")
elif((le * we) > (lt * wt)):
print("Eurecom")
elif((le * we) == (lt * wt)):
print("Tie")
'Study (etc) > Problem Solving' 카테고리의 다른 글
[BOJ / C++] 1748번 : 수 이어 쓰기 1 (0) | 2023.01.03 |
---|---|
[BOJ / C++] 24736번 : Football Scoring (0) | 2023.01.03 |
[BOJ / C++] 1476번 : 날짜 계산 (0) | 2022.12.28 |
[BOJ / C++] 10039번 : 평균 점수 (1) | 2022.12.28 |
[BOJ / C++] 10826번 : 피보나치 수 4 (0) | 2022.12.26 |