解题思路:
注意事项:
参考代码:
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语言程序设计教程(第三版)课后习题7.2 (C语言代码)浏览:620 |
C语言程序设计教程(第三版)课后习题6.4 (C语言代码)浏览:607 |
C语言程序设计教程(第三版)课后习题4.9 (C语言代码)浏览:377 |
求组合数 (C语言代码)浏览:1159 |
C语言程序设计教程(第三版)课后习题6.2 (C语言代码)浏览:711 |
1113题解浏览:791 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:530 |
C语言程序设计教程(第三版)课后习题11.3 (C语言代码)浏览:577 |
剪刀石头布 (C语言代码)浏览:1436 |
C语言程序设计教程(第三版)课后习题6.3 (C语言代码)浏览:477 |