ddddsy @ 2024-01-29 16:52:02
#include<stdio.h>
int main(){
int n;
scanf("%d",&n);
getchar();
char digit;
while(scanf("%c",&digit)!=EOF){
printf("%c",(digit-'a'+n)%26+'a');
}
return 0;
}
//在dev上使用3 xyz来测试,得到的输出结果是abc【,而且每一次换行都会出现【,但在提交界面却AC了,不是很明白为什么
by InversionShadow @ 2024-01-29 16:53:14
dev 的问题
by MikeYSYoung__0419 @ 2024-01-29 17:02:04
C++还是C
by qj10 @ 2024-01-29 17:05:52
dev 是c++
by MikeYSYoung__0419 @ 2024-01-29 17:06:01
C++的话少个
using namespace std;
by MikeYSYoung__0419 @ 2024-01-29 17:06:50
@qinweijun 那你少个
using namespace std;
by Alpha1115 @ 2024-01-29 17:11:58
但加了 using namespace std;
也会输出【
by Alpha1115 @ 2024-01-29 17:25:40
当程序换行时,实际读入dight值为'\n'
by ddddsy @ 2024-01-29 19:32:49
@MikeYSYoung__0419 是c
by ddddsy @ 2024-01-29 19:33:48
@qinweijun 用的是c语言来写的
by ddddsy @ 2024-01-29 19:45:24
@Alpha1115 噢噢好有道理欸,所以测试数据中是没有换行符吗?好奇怪啊感觉