ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1295. Crazy Notions

SEE MY SOLUTION OF THIS INTERESTING PROBLEM!
Posted by Gerasim Petrov Velchev 8 Aug 2008 18:59
#include<iostream>
using namespace std;
int main () {
int period[20]={
1,
1,
2,
0,
2,
1,
2,
0,
1,
1,2,0,1,1,2,0,1,1,2,0};
int n;
cin>>n;
cout<<period[((n%20)?n%20:20)-1]<<endl;;
system ("pause");
return 0;
}
Re: SEE MY SOLUTION OF THIS INTERESTING PROBLEM!
Posted by Pavel Khaustov [Tomsk PU] 10 Aug 2008 00:20
Do you really think that we need this one? BF 4ever...