浙大1350The Drunk Jailer 问题能转化成n以内多少个平方数?为啥还是WA#includeint main( ){long sum,n,i,k;scanf("%ld",&n);for(i=0;i
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 16:35:23
浙大1350The Drunk Jailer 问题能转化成n以内多少个平方数?为啥还是WA#includeint main( ){long sum,n,i,k;scanf("%ld",&n);for(i=0;i
浙大1350The Drunk Jailer 问题能转化成n以内多少个平方数?为啥还是WA
#include
int main( )
{
long sum,n,i,k;
scanf("%ld",&n);
for(i=0;i
浙大1350The Drunk Jailer 问题能转化成n以内多少个平方数?为啥还是WA#includeint main( ){long sum,n,i,k;scanf("%ld",&n);for(i=0;i
你给的代码没看懂
#include
#define MAXNUM 101
int opened[MAXNUM] = {0};
int main()
{
int i,j;
for(i=1;i
for(j=i;j
opened[j] = !opened[j];
}
}
for(i=1;i
while(i--)
{
scanf("%d",&j);
printf("%d\n",opened[j]);
}
}
#include
int main( )
{
long sum,n,i,k,a,b;
scanf("%ld",&n);
for(i=0;i
sum=0;
scanf("%ld",&a);
for(k=1;k<=a;k++)
全部展开
#include
int main( )
{
long sum,n,i,k,a,b;
scanf("%ld",&n);
for(i=0;i
sum=0;
scanf("%ld",&a);
for(k=1;k<=a;k++)
{
if((k*k)<=a)
sum=sum+1;
}
printf("%ld\n",sum);
}
return 0;
}
你的就差一点点哦!!!!
收起