标签:mem 数据 space out tom scanf efi closed 分析
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 848 Accepted Submission(s): 67
#include <bits/stdc++.h> using namespace std; #define LL long long LL pows(long long x,long long n) { LL res=1; while(n) { if(n&1) res*=x; n>>=1; x*=x; } return res; } int main() { LL n,m; double k; while(~scanf("%I64d%I64d%I64d",&m,&n,&k)) { LL x=__gcd(m,(m + n*pows(2,k))); printf("%I64d/%I64d\n",m/x,(m + n*pows(2,k))/x); } }
标签:mem 数据 space out tom scanf efi closed 分析
原文地址:http://www.cnblogs.com/Roni-i/p/7897185.html