Hello. If there's someone who knows a better way of explaining the second paragraph of induction part of this problem's editorial then please do it. I'm having a hard time understanding it.

Problem 1604-C Di-Visible Confusion

Thanks in advance.

By Shayan

Before stream
25:36:22

# | User | Rating |
---|---|---|

1 | tourist | 3845 |

2 | jiangly | 3707 |

3 | Benq | 3630 |

4 | orzdevinwang | 3573 |

5 | Geothermal | 3569 |

5 | cnnfls_csy | 3569 |

7 | jqdai0815 | 3532 |

8 | ecnerwala | 3501 |

9 | gyh20 | 3447 |

10 | Rebelz | 3409 |

# | User | Contrib. |
---|---|---|

1 | maomao90 | 171 |

2 | adamant | 163 |

3 | awoo | 162 |

4 | nor | 153 |

5 | maroonrk | 152 |

6 | -is-this-fft- | 151 |

6 | TheScrasse | 151 |

8 | Petr | 145 |

9 | pajenegod | 144 |

10 | orz | 143 |

Hello. If there's someone who knows a better way of explaining the second paragraph of induction part of this problem's editorial then please do it. I'm having a hard time understanding it.

Problem 1604-C Di-Visible Confusion

Thanks in advance.

↑

↓

Codeforces (c) Copyright 2010-2024 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jun/21/2024 18:23:38 (i2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|

Auto comment: topic has been updated by Wasif_Shahzad (previous revision, new revision, compare).They are basically checking if there exists a number in range [2,i+1] which doesn't divide a[i] and in case they all divide it then it must be divisible by there lcm which is going beyond the limit of a[i] i.e, 10^9. So it's not possible for a[i] to be divisible by all number in [2,i+1] if i>=22.

why only for $$$ i <= 23 $$$? I can understand that other numbers will be multiples of these numbers but what about prime numbers which are lets say on prime indices.

for example: say some number $$$ x $$$ is at $$$ i = 48 $$$

This case is confusing me only.

Edit:sorry if I couldn't convey my doubt clearly but it is related to prime numbers in the arrayOk let's take an example of array a = [1,5,3,7,2,16,31] , in this array 31 is a prime number and is also present at index 7(1-based indexing) , so we can simply delete 31 as it is not divisible by (i+1) i.e, 8.

If still not clear pls tell me briefly.