Yaoyanni @ 2023-08-24 10:17:57
6,8,9,11,12,13,14过不了
#include <stdio.h>
#include <math.h>
int main() {
int A=0;
scanf("%d",&A);
if (A == 1) {
printf("I love Luogu!");
} else if (A == 2) {
printf("6 4");
} else if (A == 3) {
int d=14,e=4;
printf("%d\n%d\n%d\n",d/e,d/e*4,d%e);
} else if (A == 4) {
double f=500,g=3,h;
h=f/g;
printf("%.6g",h);
} else if (A == 5) {
int k;
k=480/32;
printf("%d",k);
} else if (A == 6) {
int l;
l=sqrt(6*6+9*9);
printf("%d",l);
} else if (A == 7) {
int m,n;
m=110;
n=90;
printf("%d\n%d\n0\n",m,n);
} else if (A == 8) {
double p,q,r,s=3.141593;
p=2*s*5;
q=5*5*s;
r=5*5*5*s*4/3;
printf("%lf\n%lf\n%lf\n",p,q,r);
} else if (A == 9) {
printf("26");
} else if (A== 10) {
printf("9");
} else if (A== 11) {
double x;
x=100/(8-5);
printf("%lf",x);
} else if (A == 12) {
printf("13\n""r");
} else if (A == 13) {
double y,s=3.141593;
y=4/3*s*(4*4*4+10*10*10);
printf("%lf",y);
} else if (A == 14) {
int price=110,people=10;
double sum;
sum=price*people;
while(sum<3500){
price--;
people++;
}
if(sum>=3500){
sum=round(sum*10000);
printf("%.4g",price*people);
}
}
return 0;
}
by Yaoyanni @ 2023-08-24 11:44:57
@wdd2929 题目要求我用cout来写,但是我只会C语言qaq
by Yaoyanni @ 2023-08-24 11:45:39
@FurippuWRY 题目要求我用cout来写,但是我只会C语言qaq
by wdd2929 @ 2023-08-24 11:47:07
@Yaoyanni 那就学学C艹啊 现在CCF不给用C了
by FurippuWRY @ 2023-08-24 11:47:12
@Yaoyanni 你可以用printf()
啊,提交答案题而已,只要输出答案对了就行,建议学学c++,比c更方便些
by Yaoyanni @ 2023-08-24 11:59:19
@wdd2929 我现在准大一,听网上说建议先学C语言qaq 我搞不清qaq
by Yaoyanni @ 2023-08-24 11:59:57
@FurippuWRY 收到,谢谢qaq
by wdd2929 @ 2023-08-24 12:01:34
@Yaoyanni 啊这,我还以为您是打信奥的呢
by Yaoyanni @ 2023-08-24 12:13:15
@wdd2929 没办法,计算机专业,听说全是oi党qaq
by feizhu_QWQ @ 2023-08-31 17:44:41
c语言的cout是printf吧
by Crystal_Rose @ 2024-02-19 10:58:31
@FurippuWRY @FurippuWRY 好像不需要``` std::