Ural1349(费马大定理)

2015-07-20 17:12:06 来源: 作者: 浏览: 4

题目链接:点击打开链接


解题思路:

费马大定理??????Orz!!!膜拜神学。当n== 1时,输出1 、2、 3;当n==2时,输出3 、4 、5;当n >= 3时,无解。


完整代码:

#include 
  
   
#include 
   
     #include 
    
      #include 
     
       #include 
      
        #include 
       
         #include 
        
          #include 
          #include 
          
            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; } }
          
        
       
      
     
    
   
  

更多精彩请访问:点击打开链接

-->

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: