@[喜欢星星的sky](/space/show?uid=187220) char数组读入还可以加引号的吗……
by ニヒル @ 2019-03-07 18:07:51
@[ニヒル](/space/show?uid=185441) 我的意思是指取地址符……
by ニヒル @ 2019-03-07 18:09:48
@[ニヒル](/space/show?uid=185441) 可以加取地址符,但是没有用。因为定义`char S[6]`后,`S`本身就代表了`S`数组的首地址。
by StudyingFather @ 2019-03-07 18:13:39
@[喜欢星星的sky](/space/show?uid=187220) 你数组开小了...长度为6的话,要开到7的。
by StudyingFather @ 2019-03-07 18:13:57
@[StudyingFather](/space/show?uid=22030) 嗯嗯,我知道错哪了。我把空格那部分也减了64 出来的数字就是错的
by 喜欢星星的sky @ 2019-03-07 19:14:30
@[StudyingFather](/space/show?uid=22030) 还是不行啊。。。回宿舍试了一下 50分不知道错哪了
```
#include<stdio.h>
int main()
{
char S[7],T[7];
scanf("%s",&S);
scanf("%s",&T);
int a,b;
a=int(S[0])-64,b=int(T[0])-64;
for(int i=1;i<6;i++)
{
S[i]-=64,T[i]-=64;
if(S[i]+64!='\0')
a=a*S[i];
if(T[i]+64!='\0')
b=b*T[i];
}
a=a%47,b=b%47;
if(a==b)
printf("GO");
else
printf("STAY");
return 0;
}
```
by 喜欢星星的sky @ 2019-03-07 22:08:40
@[StudyingFather](/space/show?uid=22030) 我想下载测试数据但是迅雷下载里一个文件都没
by 喜欢星星的sky @ 2019-03-07 22:15:09
@[喜欢星星的sky](/space/show?uid=187220) 我下载的数据是:
```
PAOHBJ
WSNF
GO
```
你试试QAQ
by applese @ 2019-03-13 12:56:32