# ipc programming club june contest

we are organising a contest of 2 and half hours on 15th june at 9:00 pm ist to 11:30 pm ist on hackerrank.

ohh I was late to read this postâ€¦

### I have a doubt from your contest in Tricky Eyes

for test case

#### 240 36 you gave null outputâ€¦ that means according to you there is no answer possibleâ€¦

#while if we keep clock at +36 thenâ€¦

#### at 9:12

#angle of minute hand would be (72-36)= 36

#### and

#angel of hour hand would be (270+(12/2)-36)=240

1 Like

i.e. in your test case #3

formulas I used were from

for finding angle of hour and min handâ€¦

Yeah!!..I also have the same doubt.

1 Like

#include <bits/stdc++.h>
using namespace std;

``````int main() {
int h,m,i,j,a,b;
bool flag=false;
cin >> h >> m;

for(i=0;i<12;i++){
for(j=0;j<60;j+=2){
a=6*j;
b=(30*i)+j/2;
if(((a-m)%360+360)%360==((b-h)%360+360)%360){
flag=true;
break;
}
}
if(flag)
break;
}

if(flag){
cout << setfill('0') << setw(2) << i ;
cout << ":";
cout << setfill('0') << setw(2) << j ;
}
else
cout << "";

return 0;
}
``````

### Here is a solution passing all of your test cases except 3rd oneâ€¦

please do inform us earlierâ€¦ I found your questions interesting to solve but couldnâ€™t participateâ€¦ (cuz they are easy from our div1 :D)
At least inform one or two days earlyâ€¦

just solved each questionsâ€¦ all accepted