南阳 oj 语言入门 A Famous Music Composer
2015-07-24 21:10
267 查看
#include<stdio.h>
#include<string.h>
int main()
{
char a[30],b[30];
int i=0;
while(~scanf("%s%s",a,b))
{
i++;
if(a[1]=='#')
{
a[0]=(a[0]-'A'+1)%7+'A';
a[1]='b';
}
else if (a[1]=='b')
{
a[0]=(a[0]-'A'+6)%7+'A';
a[1]='#';
}
else
{
printf("Case %d: UNIQUE\n",i);
continue;
}
printf("Case %d: %s %s\n",i,a,b);
}
return 0;
}
#include<stdio.h>
#include<string.h>
int main()
{
char a[30],b[30];
int i=0;
while(~scanf("%s%s",a,b))
{
i++;
if(a[1]=='#')
{
a[0]=(a[0]-'A'+1)%7+'A';
a[1]='b';
}
else if (a[1]=='b')
{
a[0]=(a[0]-'A'+6)%7+'A';
a[1]='#';
}
else
{
printf("Case %d: UNIQUE\n",i);
continue;
}
printf("Case %d: %s %s\n",i,a,b);
}
return 0;
}
相关文章推荐
- HDU 1163 Eddy's digital Roots(九余数定理+快速幂)
- HDU 2852 KiKi's K-Number(线段树单点更新)
- Linux SSH 免密码登录
- 烦躁的一天
- hdu 3118 Arbiter(枚举构造二分图)
- C++之贪吃蛇
- 2015 HUAS Summer Training#2 E
- netBeans调试时不进入java内部类(jdk源码)的方法
- 没有任何关闭socket的日志,客户端和服务端进程都在, 网络连接完好, 为什么进行某操作后好好的tcp连接莫名其妙地断了呢?
- java.util.Random.nextInt(int n)方法实例
- tarjan求割顶和桥 hihoCoder1183 连通性一·割边与割点
- jQuery基础整理+实例
- 构建自己的AngularJS
- Linux 多学习过程
- Matlab编程知识点
- 计算两个日期间的天数
- MyEclipse常见错误汇总,中英注释版(长期更新)
- mongodb使用-增删改查、colleciton关联、_id作为主键实现update
- nyoj 915 + - 字符串 (递归)
- hdoj1002A + B Problem II