TCS Company

Given a 9 x 14 chessboard, a rook is placed at the lower left corner. Players A and B take turns moving the rook. A plays first and each turn consists of moving the rook horizontally to the right or vertically above. The last person to make a move wins the game. At the completion of the game, the rook will be at the top right corner. For example, the figure below shows a 3 x 4 chessboard and the sequence of moves that leads to a win for player A.
What is a winning first move for A (in the given 9 x 14 chessboard) ?


Read Solution (Total 4)

TCS Other Question

Cubes C1, C2, C3... and spheres S1, S2, S3... are defined in the following way.
• S1 has radius 1cm.
• For each n > 0, Cn is inscribed in Sn and Sn+1 is inscribed in Cn (i.e. C1 is inscribed in S1, S2 is inscribed in C1, C2 is inscribed in S2 and so on).
Let Vn be the sum of the volumes of the first n cubes C1, C2,..., Cn. Then as n → ∞ Vn approaches

• 4(1+3√3)/13

• 2(1+3√3)/13

• ∞, i.e. Vn is unbounded

• 1(1+3√3)/13

• 6(1+3√3)/13
a = 16, b = 15, c = 3
if (c divides a) {
if (b > c) {
x = 1
} else {
x = 2
}
} else {
if (c divides b) {
x = 3
} else {
x = 4
}
}