3.458 - The Decoder
2013-06-13 00:00
921 查看
当用以下代码计算的时候,就会发现,输入和输出相差为7。
int main()
{
char x[200];
while(gets(x)!=NULL)
{
for(int i=0; i<strlen(x); i++)
printf("%d%c",x[i],i==strlen(x)-1?'\n':' ');
gets(x);
for(int i=0;i<strlen(x);i++)
printf("%d%c",x[i],i==strlen(x)-1?'\n':' ');
}
return 0;
}
所以,此题代码为:
int main()
{
char x[200];
while(gets(x)!=NULL)
{
for(int i=0; i<strlen(x); i++)
printf("%c",x[i]-7);
printf("\n");
}
return 0;
}
int main()
{
char x[200];
while(gets(x)!=NULL)
{
for(int i=0; i<strlen(x); i++)
printf("%d%c",x[i],i==strlen(x)-1?'\n':' ');
gets(x);
for(int i=0;i<strlen(x);i++)
printf("%d%c",x[i],i==strlen(x)-1?'\n':' ');
}
return 0;
}
所以,此题代码为:
int main()
{
char x[200];
while(gets(x)!=NULL)
{
for(int i=0; i<strlen(x); i++)
printf("%c",x[i]-7);
printf("\n");
}
return 0;
}
相关文章推荐
- Volume 0. Getting Started 458 - The Decoder
- The Decoder
- 458 - The Decoder
- 【uva - 458 The Decoder】
- UVa458 - The Decoder-字符串-难度1
- UVA - 458 The Decoder
- UVaOJ 458 - The Decoder
- The Decoder
- UVA 458 The Decoder 简单解密
- UVa OJ 458-The Decoder
- 458 - The Decoder
- 458 - The Decoder
- UVA 458-The Decoder
- Uva 458 - The Decoder
- 458 - The Decoder
- 458 - The Decoder
- Uva 458 the Decoder 2015.5.24
- UVa 458 - The Decoder
- UVa 458 - The Decoder
- UVA - 458 - The Decoder