Ural1349(费马大定理)
2015-03-07 20:50
274 查看
题目链接:点击打开链接
解题思路:
费马大定理······Orz!!!膜拜神学。当n== 1时,输出1 、2、 3;当n==2时,输出3 、4 、5;当n >= 3时,无解。
完整代码:
更多精彩请访问:点击打开链接
解题思路:
费马大定理······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; } }
更多精彩请访问:点击打开链接
相关文章推荐
- URAL 1349. Farm (费马大定理)
- ural 1349
- URAL - 2018 The Debut Album(状态dp 记忆化搜索)
- URAL - 2020 Traffic Jam in Flower Town(模拟)
- A380 URAL - 1893
- URAL 1823. Ideal Gas(数学啊 )
- ural1009 数位dp
- ural 1052. Rabbit Hunt hash
- ural- 2065 Different Sums
- 【洛谷1349】广义斐波那契数列
- WUST OJ 1349 TLE(简单DP)
- URAL - 1004 Sightseeing Trip(最小环)
- URAL - 1996 Cipher Message 3 FFT+KMP
- URAL - 1519 :Formula 1
- Ural-1076 Trash(最小费用最大流算法)
- POJ 2369|URAL 1024|Permutations|置换求循环节长度
- URAL2040-Palindromes and Super Abilities 2
- uva-1349 Optimal Bus Route Design(最小费用最大流)
- URAL1091:Tmutarakan Exams(容斥 & 莫比乌斯反演)
- E - Friends and Berries URAL - 2067(三点共线)