My solution is throwing an exit code 3 upon submission. Pls tell me what's wrong in the solution. Thank you

Problem https://codeforces.com/contest/1700/problem/B

Solution-> https://ideone.com/bamalP

Before contest

Codeforces Round 940 (Div. 2) and CodeCraft-23

08:23:07

Register now »

Codeforces Round 940 (Div. 2) and CodeCraft-23

08:23:07

Register now »

*has extra registration

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

1 | ecnerwala | 3648 |

2 | Benq | 3580 |

3 | orzdevinwang | 3570 |

4 | cnnfls_csy | 3569 |

5 | Geothermal | 3568 |

6 | tourist | 3565 |

7 | maroonrk | 3530 |

8 | Radewoosh | 3520 |

9 | Um_nik | 3481 |

10 | jiangly | 3467 |

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

1 | maomao90 | 174 |

2 | adamant | 164 |

2 | awoo | 164 |

4 | TheScrasse | 160 |

5 | nor | 159 |

6 | maroonrk | 156 |

7 | -is-this-fft- | 150 |

7 | SecondThread | 150 |

9 | orz | 146 |

10 | pajenegod | 145 |

My solution is throwing an exit code 3 upon submission. Pls tell me what's wrong in the solution. Thank you

Problem https://codeforces.com/contest/1700/problem/B

Solution-> https://ideone.com/bamalP

↑

↓

Codeforces (c) Copyright 2010-2024 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Apr/21/2024 09:11:54 (l3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|

Note that the limit for the number is <= 10^1e5. The largest value that can fit in a long long variable is 1e18 which is still too small on the limit.

Thnx for the reply but I still don't get it....long long int can hold value upto 2^32 digits right? Here the largest length of the number could 1e5 so how come too small? Plz explain.

$$$2^{31} -1$$$ is the maximum

valueofint, not theamount of digits.long long(orlong long int, those two are identical) has a $$$2^{63} -1$$$ maximumvalue, but that doesn't still get close to $$$2^{32}$$$ digits. $$$2^{32}$$$ full decimal digits is equivalent to over1.6 gigabytes, this is more than we can set as the memory limit for most problems.