-
Notifications
You must be signed in to change notification settings - Fork 16
/
Aman and mr sharma
49 lines (35 loc) · 1.02 KB
/
Aman and mr sharma
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
On a distant planet far away from Earth lives a boy named Aman.He loves to run everyday.But his running distance is directly affected by how
much horlicks his mother mixed in his milk today.If his mother has mixed x grams of horlicks,then Aman will be capable of running 100*x meters
at most on that day.
Aman's instructor, Mr.Sharma ,is a very strict yet very caring.Everyday he asks Aman to run around a circle of radius r once.If Aman is able
to complete the circle,he would get a toffee.
Note:Take value of pie=22/7.
CONSTRAINTS:
1<=d<105
1<=r<106
1<=x<=104
INPUT:
First line contains d,no. of days Aman goes to his instructor.Next d lines each contain r,radius of circle and x,amount of horlicks.
OUTPUT:
Print total number of toffees Aman would finally have at the end of d days.
SAMPLE INPUT
3
3 2
5 2
1 2
SAMPLE OUTPUT
3
*/
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,c=0; cin>>n;
while(n--)
{
int r,x; cin>>r>>x;
if((44*r) <= x*700) c++;
}
cout<<c;
}