Skip to content

Instantly share code, notes, and snippets.

@rogerioagjr
Last active February 5, 2016 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogerioagjr/3a663a961c8c5b4769ba to your computer and use it in GitHub Desktop.
Save rogerioagjr/3a663a961c8c5b4769ba to your computer and use it in GitHub Desktop.
Impedido!
// Impedido! - F2PJ/F2P1 - OBI 2015
// Rogério Júnior
// Complexidade: O(1)
#include <cstdio> // scanf e printf
int main(){
// declaro e leio os valores de l, r e d
int l, r, d;
scanf("%d %d %d", &l, &r, &d);
// se as condições apresentadas no enunciado forem atendidas, imprimo o caractere 'S'
if(r>50 && l<r && r>d) printf("S\n");
// caso contrário, imprimo uma linha com o caractere 'N'
else printf("N\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment