解题思路:
注意事项:
参考代码:
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 人评分
小明A+B (C语言代码)浏览:1249 |
C语言程序设计教程(第三版)课后习题8.8 (C语言代码)浏览:1419 |
C语言训练-大、小写问题 (C语言代码)浏览:677 |
简单的a+b (C语言代码)浏览:435 |
简单的a+b (C语言代码)浏览:635 |
母牛的故事 (C语言代码)浏览:451 |
1025题 初学者,求帮忙看下,不知道哪错了浏览:316 |
C语言程序设计教程(第三版)课后习题7.5 (C++代码)浏览:1398 |
钟神赛车 (C++代码)(标准题解)(与田忌赛马类似)浏览:1728 |
母牛生小牛 (C语言代码)浏览:991 |