I `m getting wrong answer in this problem : http://www.spoj.com/problems/MLASERP/en/

Code: http://www.a2oj.com/f.jsp?i=OCMPJ1JJ

thanks in advance :)

Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems.
×

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

1 | MiFaFaOvO | 3681 |

2 | tourist | 3567 |

3 | Um_nik | 3527 |

4 | ecnerwala | 3458 |

5 | maroonrk | 3409 |

6 | 300iq | 3317 |

7 | Petr | 3272 |

8 | LHiC | 3229 |

9 | Benq | 3226 |

10 | TLE | 3223 |

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

1 | Errichto | 197 |

2 | antontrygubO_o | 188 |

3 | pikmike | 183 |

4 | Ashishgup | 182 |

5 | vovuh | 179 |

6 | Radewoosh | 167 |

7 | Um_nik | 165 |

8 | tourist | 163 |

9 | McDic | 162 |

10 | Geothermal | 157 |

I `m getting wrong answer in this problem : http://www.spoj.com/problems/MLASERP/en/

Code: http://www.a2oj.com/f.jsp?i=OCMPJ1JJ

thanks in advance :)

Be the first person to solve this problem and help me to solve it :D

problem : live archive -> 6082 — Groovy numbers

problem link : https://icpcarchive.ecs.baylor.edu/index.php?option=onlinejudge&page=show_problem&problem=4093

I tried to solve it using two different ways but still getting WA !!

This solution uses the normal way to get all divisors of a number it just iterate through sqrt of the number and check each divisor.

https://ideone.com/5wNLzi#stdin

This solution uses factorization to get all divisors of a number

The problem writer said :

" If there are multiple solutions, print any of them ".

And my code printed a valid output put it gave me wrong answer as it is "bad position " , i don`t know what is this mean ?

code : 10421263

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jul/02/2020 09:43:03 (i1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|