标签:数学
题目链接:点击打开链接
解题思路:
费马大定理······Orz!!!膜拜神学。当n== 1时,输出1 、2、 3;当n==2时,输出3 、4 、5;当n >= 3时,无解。
完整代码:
#include <algorithm>
#include <iostream>
#include <cstring>
#include <climits>
#include <cstdio>
#include <string>
#include <cmath>
#include <map>
#include <queue>
using namespace std;
typedef long long LL;
const int MOD = int(1e9)+7;
const int INF = 0x3f3f3f3f;
const double EPS = 1e-9;
const double PI = acos(-1.0); //M_PI;
int main()
{
#ifdef DoubleQ
freopen("in.txt","r",stdin);
#endif
int n;
while(cin >> n)
{
if(n == 1)
cout << "1 2 3" << endl;
else if(n == 2)
cout << "3 4 5" << endl;
else
cout << "-1" << endl;
}
}标签:数学
原文地址:http://blog.csdn.net/u013447865/article/details/44119855