Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
20630 | 陶俊宸 | 印度国王的棋盘 | C++ | 解答错误 | 10 | 0 MS | 268 KB | 266 | 2021-06-19 16:05:24 |
#include<iostream> #include<cmath> short k,n,b3; int ans; int main(){ scanf("%hd,%hd",&k,&n); ans=pow(2,n)-pow(2,k-1); if(ans<1000000) printf("%d",ans); else{ b3=ans%1000; while(ans>=1000) ans/=10; printf("%.03hd,%hd",b3,ans); } return 0; }