华东交通大学2016年ACM“双基”程序设计竞赛 A:简单题

来源:互联网 发布:青少年人工智能 编辑:程序博客网 时间:2024/04/30 15:15

简单题

Time Limit :3000/1000ms (Java/Other)   Memory Limit : 65535/32768K(Java/Other)

Total Submission(s): 47   Accepted Submission(s) : 33

Font: Times NewRoman | Verdana | Georgia

Font Size: ← →

ProblemDescription

输入一个非负的int型整数,是奇数的话输出"ECJTU",是偶数则输出"ACM"。

Input

多组数据,每组数据输入一个x。
输入到文件结尾结束(scanf函数返回值不为EOF时),例如:
#include<cstdio>
using namespace std;
int main()
{
int x;
while (scanf("%d", &x)!=EOF) {
if (x%2==1) printf("...\n");
else printf("...\n");
}
  return 0;
}

Output

每组输出数据占一行。

Sample Input

1

2

Sample Output

ECJTU

ACM

 

题解:本场签到题,水题,不解释


上代码:

#include<iostream>using namespace std;int main(){    int x;    while(cin>>x)    {        if(x%2)            cout<<"ECJTU"<<endl;        else cout<<"ACM"<<endl;    }    return 0;}


0 0