cid=77956#overview
#include<stdio.h> #define mod 1000000007 #define LL long long LL ppow(LL x,LL n) { LL tp=1; while(n) { if(n&1) tp=tp*x%mod; n>>=1; x=x*x%mod; } return tp; } int main() { int ca=1,T; scanf("%d",&T); LL n; while(ca<=T) { scanf("%lld",&n); printf("Case #%d: %lld\n",ca++,(n*ppow(2,n-1))%mod); } return 0; }
版权声明:本文博主原创文章,博客,未经同意不得转载。
转载于:https://www.cnblogs.com/bhlsheji/p/4889270.html
相关资源:数据结构—成绩单生成器