标签:ane others space define other namespace can main sample
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)
#include<bits/stdc++.h> using namespace std; #define ll long long #define pi (4*atan(1.0)) #define eps 1e-14 const int N=2e5+10,M=4e6+10,inf=1e9+10,MOD=1000; const ll INF=1e18+10; int a[100]={1,15,150,750,7500,75000,750000,7500000,75000000,750000000}; int main() { int T; scanf("%d",&T); while(T--) { int k,m; scanf("%d%d",&k,&m); if(k==2) printf("%d\n",((m-1)/4*5+1)*a[k]+((m-1)%4)*a[k]); else printf("%d\n",((m-1)/9*10+1)*a[k]+((m-1)%9)*a[k]); } return 0; }
标签:ane others space define other namespace can main sample
原文地址:http://www.cnblogs.com/jhz033/p/6005689.html