#16842: AC


089487 (089487)

學校 : 國立臺灣師範大學附屬高級中學
編號 : 82069
來源 : [220.130.10.185]
最後登入時間 :
2024-04-01 11:16:18
a700. 2、国王的麦子(Wheat) -- abs2000模拟赛 | From: [223.140.78.139] | 發表日期 : 2019-02-12 19:05

#include<bits/stdc++.h>
using namespace std;
int main()
{
long long int a,b,m;
while(cin>>a>>b)
{
m=pow(2,8*(a-1)+b-1);
if(a==1&&b==1) cout<<1<<endl;
else cout<<m<<endl;
}
}

 
#17196: Re:AC


ufve0704 (爬 我爬 我爬爬爬 有排行榜這種東西就是要爬 爬過我上面的那...)

學校 : 臺北市私立延平高級中學
編號 : 83268
來源 : [203.72.178.1]
最後登入時間 :
2023-10-30 13:02:50
a700. 2、国王的麦子(Wheat) -- abs2000模拟赛 | From: [114.42.211.174] | 發表日期 : 2019-03-24 19:29

#include<bits/stdc++.h>
using namespace std;
int main()
{
long long int a,b,m;
while(cin>>a>>b)
{
m=pow(2,8*(a-1)+b-1);
if(a==1&&b==1) cout<<1<<endl;
else cout<<m<<endl;
}
}

比你短

#include <bits/stdc++.h>

using namespace std;

int main(int argc, char** argv){

long long int a,b;

while(cin>>a>>b){

b=pow(256,(a-1))*pow(2,(b-1));

cout<<b<<endl;

}

}

 

 

 
ZeroJudge Forum