1
#includeiostream
usingnamespacestd;
intmain()
{
inta,b,c,d;
cinabcd;
coutcd;
return0;
}
2
#includeiostream
usingnamespacestd;
intmain()
{
doublea,b;
scanf("%lf%lf",a,b);
printf("%.3f%%",b/a*);
return0;
}
3
#includebits/stdc++.h
usingnamespacestd;
intmain()
{
inta,b,sum=0;
cinab;
if(a60)
{
sum++;
}
if(b60)
{
sum++;
}
cout(sum==1?1:0)endl;
return0;
}
4
#includebits/stdc++.h
usingnamespacestd;
intmain()
{
intk,cnt1=0,cnt5=0,cnt10=0;
cink;
for(inti=0;ik;i++)
{
intx;
cinx;
switch(x)
{
case1:
{
cnt1++;
break;
}
case5:
{
cnt5++;
break;
}
case10:
{
cnt10++;
break;
}
default:
break;
}
}
coutcnt1endlcnt5endlcnt10endl;
return0;
}
5
#includebits/stdc++.h
usingnamespacestd;
intmain()
{
intk,day=1,cnt=0,coincnt=0;
cink;
while(cntk)
{
cnt+=day;
day++;
}
for(inti=1;iday;i++)
{
coincnt+=i*i;
}
coutcoincnt-((cnt-k)*(day-1))endl;
return0;
}
==============================长按判别