Fishing
Connect to the TCP Judge
Run your solver locally and connect to the judge. For each test case, send the correct output. When you clear every case, the judge prints the flag.
Sample Test Cases
7 3\n
823525
53 40\n
24356848165022712132477606520104725518533453128685640844505130879576720609150223301256148293
| Input | Output |
|---|---|
7 3\n |
823525 |
53 40\n |
24356848165022712132477606520104725518533453128685640844505130879576720609150223301256148293 |
The judge cycles through these cases (and any others configured). Return the exact output for each to earn the flag.
Problem Description
One day, N fishermen (1 < N < 60) went fishing, and they caught X fish. Afterwards, the fishermen went to sleep. In the morning, one by one, as each fisherman woke up, the first one to wake thought: “I am the first to wake up,” and divided the collected fish into N equal parts. Each time, there were exactly K (0 < K < N) extra fish left over, which he threw back into the sea so that there would be no dispute among the fishermen. Then he took his share of the fish and left, leaving the remaining fish gathered together again. (Each fisherman caught at least 1 fish.)
Your task is: for the given N and K, determine the minimal positive X — the smallest number of fish that satisfies the conditions of this problem.
Login to submit a solution.
Frequently Asked Questions
This is a expert level problem worth 200 points.
This is a coding problem problem in the Coding category.
0 users have successfully solved this problem.
Related Problems
Try these similar problems to improve your skills