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 1349. Farm

mihai031996 Strong tests :) [2] // Problem 1349. Farm 19 Feb 2016 03:16
First , I wrote fast exponentiation for two choises of modulo but then i submited the following program :
# include <bits/stdc++.h>

using namespace std;
# define ll long long
int main(void)
{
        ll a,b,c;
        ll n;
        cin >> n;
        if (n==1) cout << "1 2 3";
        else if (n==2) cout << "3 4 5";
        else cout << -1;

        return  0;
}



And guess what , it got AC ! :)
zorggish Re: Strong tests :) [1] // Problem 1349. Farm 25 Jan 2019 23:36
It is because Fermat's Last Theorem
Ratnadeep Nandi Re: Strong tests :) // Problem 1349. Farm 29 Jul 2019 15:00
Never knew this in Graduation math :(