提交时间:2021-06-19 16:32:45

运行 ID: 20637

#include<bits/stdc++.h> using namespace std; int a,b,cou,d,ll,mm,aa,bb,cc; char lllll; int main(){ cin>>a>>lllll>>b; for(double i=a;i<=b;i++){ cou+=pow(2,(i-1)); } if(cou>=1000000){ ll=cou%1000; while(cou){ cou/=10; if(cou<1000&&cou>=100){ aa=cou/10; bb=cou/100; cc=cou/1000; } } cout<<aa<<bb<<cc<<","<<ll; } else{ cout<<cou; } return 0; }