Skip to content

Instantly share code, notes, and snippets.

@rajurayhan
Created March 29, 2015 07:18
Show Gist options
  • Save rajurayhan/f239e068e5bb5b7dc83a to your computer and use it in GitHub Desktop.
Save rajurayhan/f239e068e5bb5b7dc83a to your computer and use it in GitHub Desktop.
URI Problem 1046-Game Time
#include<stdio.h>
int main(){
int a,b,c;
scanf("%d %d",&a,&b);
if(a==b)
printf("O JOGO DUROU %d HORA(S)\n",24-0);
else if(a>b){
c=(24-a)+b;
printf("O JOGO DUROU %d HORA(S)\n",c);
}
else {
c=b-a;
printf("O JOGO DUROU %d HORA(S)\n",c);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment