I’ve written this code. But it’s failing one test case.
hello @payal_05
use long long for ur ans variable.