codeforces710A--King Moves水
来源:互联网 发布:统计软件 编辑:程序博客网 时间:2024/05/21 15:04
D - King Moves
Time Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uAppoint description:
Description
The only king stands on the standard chess board. You are given his position in format "cd", where c is the column from 'a' to 'h' and d is the row from '1' to '8'. Find the number of moves permitted for the king.
Check the king's moves here https://en.wikipedia.org/wiki/King_(chess).
Input
The only line contains the king's position in the format "cd", where 'c' is the column from 'a' to 'h' and 'd' is the row from '1' to '8'.
Output
Print the only integer x — the number of moves permitted for the king.
Sample Input
Input
e4
Output
8
可以走多少步(周围有多少格)
0 0
- codeforces710A--King Moves水
- A. King Moves
- codeforces 710A-King Moves
- Codeforces 710A- King Moves
- CodeForces-710A. King Moves
- 【模拟】Codeforces 710A King Moves
- Codeforces Problem 710A King Moves(implementation)
- Educational Codeforces Round 16 A. King Moves
- CodeForces 710A King Moves(第一次打CF)
- 【CodeForces】〖 Educational Codeforces Round 16〗A. King Moves
- 【Educational Codeforces Round 16】Codeforces 710A King Moves
- Educational Codeforces Round 16 A. King Moves【模拟】
- Codeforces刷题之路——710A King Moves
- King
- King
- king
- King
- poj2243-Knight Moves-水bfs
- 关于事件和委托的详解
- 第十一周阅读程序(4)
- Android -- 蓝牙开发 <一>
- 产品开发项目中文档的重要性
- android的消息处理机制(图+源码分析)——Looper,Handler,Message
- codeforces710A--King Moves水
- Mustache.js语法学习笔记
- 第十一周项目5-摩托车继承自行车和机动车
- Codeforces #369C Vanya and Scales
- Javascript语言精粹
- 第十二周阅读程序(1)
- Velocity布局(layout)功能介绍
- swift设置applicationIconBadgeNumber的值
- Spring IOC学习心得之IOC容器的初始化过程