DrhF's blog

By DrhF, 9 years ago, translation, In English

Hello! I would like to hear your thoughts about this task:

There are N (1 ≤ N ≤ 10000) numbered porcelain canaries on the table. Each canary colored in a color encrypted with the numbers (no more than 1000 colors). Robot has few requests with two integers: A (1 ≤ A ≤ 10000) and B (1 ≤ B ≤ 1000). Robot colors all canaries with sequence number multiple of A to color B. If A = 1 robot colors canaries with prime sequence number or with sequence number 1. Robot colors canaries regardless of their original colour. You need at the fewest number of requests and the fewest number of colorings to ensure that all canaries painted the same color. You have to output sequence of requests as an answer.

Full text and comments »

  • Vote: I like it
  • -1
  • Vote: I do not like it