Accepted
Code
def count_ways_to_distribute_candies(N):
ways = 0
for i in range(1, int(N**0.5) + 1):
if N % i == 0:
ways += 2 if i != N // i else 1
return ways
def main():
N = int(input())
result = count_ways_to_distribute_candies(N)
print(result)
if __name__ == "__main__":
main()
Information
- Submit By
- Type
- Submission
- Problem
- P1037 Generous CR
- Contest
- Brain booster #2
- Language
- Python 3 (Python 3.12.3)
- Submit At
- 2024-03-06 14:05:39
- Judged At
- 2024-11-11 03:42:06
- Judged By
- Score
- 100
- Total Time
- 16ms
- Peak Memory
- 3.133 MiB