OTHS Coding Competition 2 P1 - Chess Pieces

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Python 2.0s
Memory limit: 512M

Author:
Problem type

Shiro loves chess and thus asks you to code a program that outputs the value of a given chess piece. The pieces include a queen worth 9, a rook worth 5, a bishop and a knight worth 3 each, a pawn worth 1, and the king being priceless. Given the name of the piece s, your program is to provide the respective value or "priceless".

Input Specification

The first line contains the name s of the selected piece in lowercase.

Output Specification

Output the value of the piece as specified above.

Sample Input 1

queen

Sample Output 1

9

Sample Input 2

king

Sample Output 2

priceless

Comments

There are no comments at the moment.