Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
54371 | 尹翊泽 | 国王的米粒 | C++ | Wrong Answer | 20 | 0 MS | 256 KB | 242 | 2022-07-29 15:00:32 |
#include<bits/stdc++.h> using namespace std; long long m,n,b=1,a=1; int main(){ cin>>m>>n; for(int i=1;i<=m;i++){ a*=2; } for(int i=1;i<=n;i++){ b*=2; } b-=1,a-=1; if(b>a) cout<<b-a+1; else cout<<a-b+1; return 0; }