#include<bits/stdc++.h>
using namespace std;
int main()
{
int p,y,s,cnt=0;
cin >> p >> s >> y;
while(1)
{
int i = (s/50)%475;
for(int j=0;j<25;j++)
{
i = (i * 96 + 42)%475;
if((i+26)==p)
{
cout << cnt << endl;
return 0;
}
}
int t = s,c=0;
t -= 50;
while(t>=y)
{
int j = (t/50)%475;
for(int k=0;k<25;k++)
{
j = (j * 96 + 42)%475;
if((j+26)==p)
{
cout << cnt << endl;
return 0;
}
}
c++;
t -= 50;
}
s += 100;
cnt++;
}
return 0;
}
Sunday, 7 May 2017
Codeforces T-Shirt Hunt Solution
About Amanur Rahman
Soratemplates is a blogger resources site is a provider of high quality blogger template with premium looking layout and robust design. The main mission of templatesyard is to provide the best quality blogger templates.
Codeforces T-Shirt Hunt Solution
Labels:
Codeforces T-Shirt Hunt Solution
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment