Codeforces Solution 1178C. Tiles
Solve in C++:
#include <iostream>
using namespace std;
int main()
{
int w,h,i,result=1;
cin>>w>>h;
for(i=0;i<w+h;i++)
{
result=(result+result)%998244353;
}
cout<<result<<endl;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int w,h,i,result=1;
cin>>w>>h;
for(i=0;i<w+h;i++)
{
result=(result+result)%998244353;
}
cout<<result<<endl;
return 0;
}
No comments