0%

Problem 424


Problem 424


Kakuro

The above is an example of a cryptic kakuro (also known as cross sums, or even sums cross) puzzle, with its final solution on the right. (The common rules of kakuro puzzles can be found easily on numerous internet sites. Other related information can also be currently found at krazydad.com whose author has provided the puzzle data for this challenge.)

The downloadable text file (kakuro200.txt) contains the description of 200 such puzzles, a mix of 5x5 and 6x6 types. The first puzzle in the file is the above example which is coded as follows:

6,X,X,(vCC),(vI),X,X,X,(hH),B,O,(vCA),(vJE),X,(hFE,vD),O,O,O,O,(hA),O,I,(hJC,vB),O,O,(hJC),H,O,O,O,X,X,X,(hJE),O,O,X

The first character is a numerical digit indicating the size of the information grid. It would be either a 6 (for a 5x5 kakuro puzzle) or a 7 (for a 6x6 puzzle) followed by a comma (,). The extra top line and left column are needed to insert information.

The content of each cell is then described and followed by a comma, going left to right and starting with the top line.
X = Gray cell, not required to be filled by a digit.
O (upper case letter)= White empty cell to be filled by a digit.
A = Or any one of the upper case letters from A to J to be replaced by its equivalent digit in the solved puzzle.
( ) = Location of the encrypted sums. Horizontal sums are preceded by a lower case “h” and vertical sums are preceded by a lower case “v”. Those are followed by one or two upper case letters depending if the sum is a single digit or double digit one. For double digit sums, the first letter would be for the “tens” and the second one for the “units”. When the cell must contain information for both a horizontal and a vertical sum, the first one is always for the horizontal sum and the two are separated by a comma within the same set of brackets, ex.: (hFE,vD). Each set of brackets is also immediately followed by a comma.

The description of the last cell is followed by a Carriage Return/Line Feed (CRLF) instead of a comma.

The required answer to each puzzle is based on the value of each letter necessary to arrive at the solution and according to the alphabetical order. As indicated under the example puzzle, its answer would be 8426039571. At least 9 out of the 10 encrypting letters are always part of the problem description. When only 9 are given, the missing one must be assigned the remaining digit.

You are given that the sum of the answers for the first 10 puzzles in the file is 64414157580.

Find the sum of the answers for the 200 puzzles.


数和

上述是一个数和游戏的题板,右侧是它的解答。(数和游戏的规则可以在很多网站上找到,其它相关的信息也可以在krazydad.com上找到,这个网站的作者提供了这道谜题。)

文本文件kakuro200.txt中包含了200个这样的谜题的描述,其中有5x5和6x6两种大小。文件中的第一个谜题就是上面给出的这个样例,它的代码如下所示:

6,X,X,(vCC),(vI),X,X,X,(hH),B,O,(vCA),(vJE),X,(hFE,vD),O,O,O,O,(hA),O,I,(hJC,vB),O,O,(hJC),H,O,O,O,X,X,X,(hJE),O,O,X

第一个字符是一个数字,表示了这个谜题题版的大小,要么是6(表示5x5题板)要么是7(表示6x6题板),随后跟着一个逗号(,)。多余的最上行和最下列是用来提供信息的。

每一个的信息随后逐个被表示出来,并用逗号分割,按照从上往下,从左往右的顺序。
X = 灰色方格,不要求填数字。
O(大写字母) = 空白方格,要求填一个数字。
A = 大写字母A至J,等待用对应的数字进行替换。
( ) = 加密过的和的位置。横行的和用小写字母“h”开头,竖列的和用小写字母“v”开头,随后是一个或两个大写字母,表示这一行或一列的和是一位或两位数。对于两位数,第一个大写字母是十位数而第二个大写字母是个位。如果一个方格既要指示横行的和又要指示竖列的和,第一个永远是横行的和,而且两者必然在同一个括号内用逗号分开,例如(hFE,vD)。每一组这样的括号也必然跟随着一个逗号。

最后一格的描述之后跟随的是一个回车加换行(CRLF)而非逗号。

最后给出的答案是将各个大写字母按顺序替换成对应的数字组成的字符串,如上述样例题板的答案将是8426039571,根据题目的描述,至少可以确定其中9个数字和对应的字母,如果只给出了9个数字,则剩下的数字和剩下的字母必然对应。

已知文件中前10个题板的答案和是64414157580。

求这200个题板的答案和。