#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
![Author Image](http://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyYeATeH0bE9pQcQwHd0INuscbtI-tUqgrNANwiWH2d5uhNKFJ0bBlO9HERW76OZAOIJF2fJGVzE14tCk0xDTQYHx9wx6tTIHM3i1wZhPQ281mOVXavwD7ofWD-EH3wg/s113/mr+star+lord.jpg)
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