华东交通大学2016年ACM“双基”程序设计竞赛 1001

Problem Description

输入一个非负的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

Author

zhengjinke2123
解法:没什么好说的
#include<stdio.h>
//#include<bits/stdc++.h>
#include<string.h>
#include<iostream>
#include<math.h>
#include<sstream>
#include<set>
#include<queue>
#include<map>
#include<vector>
#include<algorithm>
#include<limits.h>
#define inf 0x3fffffff
#define INF 0x3f3f3f3f
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define LL long long
#define ULL unsigned long long
using namespace std;
int main()
{
    int n;
    while(cin>>n)
    {
        if(n%2==0)
        {
            cout<<"ACM"<<endl;
        }
        else
        {
            cout<<"ECJTU"<<endl;
        }
    }
    return 0;
}

  

转载于:https://www.cnblogs.com/yinghualuowu/p/6084460.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值