Hello, world!
时间限制: 1s 内存限制: 64MB
题目描述
This is the first problem for test. Since all we know the ASCII code, your job is simple: Input numbers and output corresponding messages.
输入格式
The input will contain a list of positive integers separated by whitespaces(spaces, newlines, TABs). Please process to the end of file (EOF). The integers will be no less than 32.
输出格式
Output the corresponding message. Note there is NOT a newline character in the end of output.
样例输入
72 101 108 108 111 44
32 119 111 114 108 100 33
样例输出
Hello, world!
AC代码(C语言)
#include<stdio.h>
int main(){
/*这里freopen函数用于输入测试用例,
将测试用例保存在文件中,让程序每次运行时从文件中读取数据,就不需要每次运行代码时手动输入测试用例。
freopen()函数的头文件为<stdio.h>*/
//freopen("data.in.txt","r",stdin);//输入重定向,输入数据将从data.in.txt文件中读取
int num;
while(scanf("%d",&num)!=EOF){
printf("%c",num);
}
return 0;
}