在cayun星球月亮大小都有一个规律,月亮为每30天一个周期,在这30天的周期里,月亮的大小分别为0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,虽然天气很冷,但某个cayun今天却异常疯癫,不知为何居然想要赏月了。但他想在赏月之前知道今天的月亮到底有多大。
Problem L: cayun日常之赏月
Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 232 Solved: 115
[Submit][Status][Web Board]
Description
Input
第一行数据组数T(T <= 30)
对于每组数据两个整数a, b(0 <= a, b <= 15),表示前两天的月亮大小,保证数据是合法的
Output
每组数据占一行,表示今天的月亮大小
Sample Input
2
0 1
11 10
Sample Output
2
9
HINT
한국어
中文
فارسی
English
ไทย
Anything about the Problems, Please Contact Admin:admin
All Copyright Reserved 2010-2013 ZJUT ONLINE JUDGE TEAM
GPL2.0 2003-2013 HUSTOJ Project TEAM
Anything about the Problems, Please Contact Admin:admin
All Copyright Reserved 2010-2013 ZJUT ONLINE JUDGE TEAM
GPL2.0 2003-2013 HUSTOJ Project TEAM