标签:要求 can script href div 情况 col 实例 The
传送门:
http://acm.hdu.edu.cn/showproblem.php?pid=2048
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 50263 Accepted Submission(s): 20303
#include<stdio.h> using namespace std; typedef long long LL; #define max_v 30 int main() { LL sum; LL a[max_v]; a[0]=0; a[1]=0; a[2]=1; for(int i=3;i<=25;i++) { a[i]=(i-1)*(a[i-1]+a[i-2]); } int n,t; scanf("%d",&t); while(t--) { scanf("%d",&n); sum=1; for(int i=1;i<=n;i++) sum*=i; printf("%.2lf%%\n",(double)a[n]*100.0/(sum)); } return 0; }
标签:要求 can script href div 情况 col 实例 The
原文地址:https://www.cnblogs.com/yinbiao/p/9371246.html