解题思路:
注意事项:
参考代码:
dic={'a':1,'b':2,'c':3,'d':4,'e':5,'f':6,'g':7,'h':8} n=int(input()) for i in range(n): st=input() s=8 if dic[st[0]]-28: s -= 1 if dic[st[0]]-18: s -= 1 if dic[st[0]]+2>8 or int(st[1])+1>8: s -= 1 if dic[st[0]]+1>8 or int(st[1])+2>8: s -= 1 if dic[st[0]]+1>8 or int(st[1])-28 or int(st[1])-1<=0: s -= 1 if dic[st[0]]-1<=0 or int(st[1])-2<=0: s -= 1 if dic[st[0]]-2<=0 or int(st[1])-1<=0: s -= 1 print(s)
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:482 |
【计算直线的交点数】 (C语言代码)浏览:1453 |
a+b浏览:433 |
字符逆序 (C语言代码)浏览:510 |
C语言程序设计教程(第三版)课后习题3.7 (C语言代码)浏览:573 |
C二级辅导-公约公倍 (C语言代码)浏览:1312 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:516 |
C语言训练-求PI* (C语言代码)浏览:338 |
开心的金明浏览:1508 |
Manchester- 校门外的树浏览:3231 |