Skip to content

Instantly share code, notes, and snippets.

@luciocf
Created August 20, 2019 00:49
Show Gist options
  • Save luciocf/e56c09f6b71f352ab2cbe9317d97720f to your computer and use it in GitHub Desktop.
Save luciocf/e56c09f6b71f352ab2cbe9317d97720f to your computer and use it in GitHub Desktop.
Comentário Noic OBI 2019 - Fase 1 - Programação Nível 1
// 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