Created
August 20, 2019 00:49
-
-
Save luciocf/e56c09f6b71f352ab2cbe9317d97720f to your computer and use it in GitHub Desktop.
Comentário Noic OBI 2019 - Fase 1 - Programação Nível 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Comentário Noic OBI 2019 - Fase 1 - Programação Nível 1 | |
// Nota Cortada | |
#include <bits/stdc++.h> | |
using namespace std; | |
int main(void) | |
{ | |
int B, T; | |
cin >> B >> T; | |
// metade da área do retângulo | |
int metade = (70*160)/2; | |
// área do lado esquerdo | |
int area = (70*(B+T))/2; | |
if (area == metade) cout << "0\n"; | |
else if (area > metade) cout << "1\n"; | |
else cout << "2\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment