/ 科创班 /

记录详情

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);
         ^
/in/foo.c:4:13: warning: variable 'd' set but not used [-Wunused-but-set-variable]
 char s[max],d[max];
             ^
# 状态 耗时 内存占用
#1 Wrong Answer 2ms 256.0 KiB
#2 Wrong Answer 4ms 256.0 KiB
#3 Wrong Answer 2ms 256.0 KiB
#4 Wrong Answer 2ms 256.0 KiB
#5 Wrong Answer 3ms 256.0 KiB
#6 Wrong Answer 3ms 256.0 KiB
#7 Wrong Answer 1ms 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] + 5) - 'a')%26;
d[i] = 'a' + r - 1;
i++;
}
return 0;
}

信息

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