Chef and Tiles
CodeChefOpen on judge ↗
You are provided an area divided into M x N blocks. A straight, red line has been drawn from one corner to another (left to right). Find the number of blocks that contains the red line on it. Input: 1. The first line will input T - the number of testcases. 2. The following T lines will contain M , N as space separated inputs (M=rows, N=Cols) Output: 1. Print a single line integer - the numb
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start