Files
python/C++专题课程/历年试题与资料/蓝桥杯2018年试题C++/1.cpp
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

16 lines
232 B
C++

#include<bits/stdc++.h>
using namespace std;
int main() {
int fenzi=0;
//分母,也是最大值
int fenmu =pow(2,19);
for(int i=0; i<20; i++) {
fenzi+=fenmu/pow(2,i);
}
cout<<fenzi<<"/"<<fenmu<<endl;
return 0;
}