/ 科创班 /

记录详情

Wrong Answer

/in/foo.c: In function 'main':
/in/foo.c:5:9: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[50]' [-Wformat=]
 scanf("%s",&s);
         ^
# 状态 耗时 内存占用
#1 Wrong Answer 2ms 256.0 KiB
#2 Wrong Answer 2ms 256.0 KiB
#3 Wrong Answer 2ms 256.0 KiB
#4 Wrong Answer 2ms 256.0 KiB
#5 Wrong Answer 2ms 256.0 KiB
#6 Wrong Answer 1ms 256.0 KiB
#7 Wrong Answer 2ms 256.0 KiB
#8 Wrong Answer 2ms 256.0 KiB
#9 Wrong Answer 2ms 256.0 KiB
#10 Wrong Answer 1ms 256.0 KiB

代码

#include<stdio.h>
#define max 50
int main(){
char s[max],d[max];
scanf("%s",&s);
int i = 0;
while(s[i]!='\0'){
int r = (s[i] + 4 - ('a' - 1))%26;
d[i] = ((s[i]>='a')?'a':'A'+6)+ r;
i++;
}
d[i] = '\0';
printf("%s",d);
return 0;
}

信息

递交者
类型
递交
题目
破译密码
题目数据
下载
语言
C
递交时间
2018-05-14 22:38:22
评测时间
2018-05-14 22:38:22
评测机
分数
0
总耗时
21ms
峰值内存
256.0 KiB