解题思路:
注意事项:
参考代码:
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语言程序设计教程(第三版)课后习题9.6 (C语言代码)浏览:575 |
C语言程序设计教程(第三版)课后习题3.7 (C语言代码)浏览:326 |
1011题解浏览:760 |
1126题解浏览:578 |
前10名 (C语言代码)浏览:725 |
链表数据求和操作 (C语言代码)浏览:939 |
杨辉三角 (C语言代码)浏览:676 |
C语言程序设计教程(第三版)课后习题5.5 (C语言代码)浏览:800 |
A+B for Input-Output Practice (III) (C语言代码)浏览:418 |
1250题解浏览:555 |