标签:ror cin hid show black bsp algorithm closed 它的
一个数表示n(n<=1e15)
如果能表示 输出各项系数和
不能 输出No
3
-2
//被某大佬一眼看穿,当 x = 60 度时,即为系数和,所以直接输出即可
1 # include <cstdio> 2 # include <cstring> 3 # include <iostream> 4 # include <algorithm> 5 # include <cmath> 6 using namespace std; 7 # define LL long long 8 # define INF 0x3f3f3f3f 9 # define MX 100005 10 /**************************/ 11 # define BUF_SIZE 100000 12 # define OUT_SIZE 100000 13 bool IOerror=0; 14 15 const double pi=acos(-1.0); 16 int main () 17 { 18 long long n; 19 cin>>n; 20 n%=6; 21 int ans=(int)(2*cos(n*pi/3)); 22 cout<<ans<<endl; 23 return 0; 24 }
标签:ror cin hid show black bsp algorithm closed 它的
原文地址:http://www.cnblogs.com/haoabcd2010/p/7475971.html