标签:cep mis 怎么 输入 inf span c++ map names
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 60147 Accepted Submission(s): 23898
//#include <bits/stdc++.h> #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> #include <iostream> #include <algorithm> #include <iostream> #include <cstdio> #include <string> #include <cstring> #include <stdio.h> #include <queue> #include <stack>; #include <map> #include <set> #include <string.h> #include <vector> #define ME(x , y) memset(x , y , sizeof(x)) #define SF(n) scanf("%d" , &n) #define rep(i , n) for(int i = 0 ; i < n ; i ++) #define INF 0x3f3f3f3f #define mod 1000000007 using namespace std; typedef long long ll ; ll a[59]; int main() { int t ; a[2] = 1 ; a[3] = 2 ; for(int i = 4 ; i <= 20 ; i++) a[i] = (i-1)*(a[i-1] + a[i-2]); scanf("%d" , &t); while(t--) { ll n , ans = 1; scanf("%lld" , &n); for(int i = 1 ; i <= n ; i++) ans *= i ; printf("%.2lf%%\n" , (double)a[n]/ans*100); } return 0; }
标签:cep mis 怎么 输入 inf span c++ map names
原文地址:https://www.cnblogs.com/nonames/p/11441417.html