弹力球
#include<iostream>
using namespace std;
int main() {
float a, h, i;
cin >> a;
h = a;
for (i = 0; i < 9; i++) {
h += a;
a /= 2;
}
a /= 2;//因为这里漏算了第十次弹起的高度
cout << h << endl << a;
return 0;
}
#include<iostream>
using namespace std;
int main() {
int n,sc,sum=0;
float a;
cin>>n;
for(int i=1;i<=n;i++){
cin>>sc;
if(sc>=80){
sum++;
}
}
a=100*1.0*sum/n;
printf("%.3f%%",a);//%%输出%
return 0;
}
#include<iostream>
using namespace std;
int main() {
int n, a = 1;
cin >> n;
if (n != 0) {
for (int i = 1; i <= n; i++) {
a *= i;
}
} else {
a = 1;
}
cout << a << endl;
cout << sizeof(long long);
return 0;
}