Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat duels/553

Duel #553

A 1v1 battle on the problem «Calendar row and column».

@akh1khayrullayev · Elo: 1138 (-11) · Newbie
No attempts
Tests: 0/20 (0%)
BATTLE OVER Winner: Sojida Otaqulova Solved in 2 min 33 s
Pupil · Elo: 1280 (+11) · @sojida_otaqulova
1st place · 2 min 33 s
Tests: 20/20 (100%)

Winner: Sojida Otaqulova

The winner was the first to solve it correctly — in 2 min 33 s.

Integer-39 Integer Medium 1000 ms 64 MB

Calendar row and column

A month's calendar is written as a table: each row has $7$ columns, column $1$ is Monday, …, column $7$ is Sunday. Day $1$ of the month falls on day $d$ of the week and is written in column $d$ of row $1$; the following days continue along that row, and when the row ends they continue from column $1$ of the next row. Find the row and the column of day $k$.

A month calendar table: day 1 is in column d; the row and column of day k are found

Sample tests

Input #1
3 17
Output #1
3 5
Input #2
7 1
Output #2
1 7

Battle results compared

1v1 report
Asadbek Xayrullayev
@akh1khayrullayev
Not solved
Sojida Otaqulova
@sojida_otaqulova
Winner (1st place)
— Solve time 02:33
0 Submissions 1
— Language C++ (GCC 15)
— Run time 3 ms

Submission timeline (1)

All submissions
S Sojida Otaqulova +02:33
WIN Accepted
C++ (GCC 15) · 3 ms · 4 MB

Sojida Otaqulova won

The 1v1 battle ended after a hard fight.

A Asadbek Xayrullayev
Solution: Not solved
Rating: 1138 (-11)
S Sojida Otaqulova
Solution: 2 min 33 s
Rating: 1280 (+11)
RIVAL FOUND!

1v1 DUEL IS STARTING

Asadbek Xayrullayev 1149 Elo
VS 15 minutes
Sojida Otaqulova 1257 Elo

Loading the arena...