Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication12
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int d = 2;
- int sqrSum = 0;
- while (n!= 1)
- {
- while(n % d == 0)
- {
- n /= d;
- sqrSum += d * d;
- }
- d++;
- }
- Console.WriteLine(sqrSum);
- }
- }
- }
Add Comment
Please, Sign In to add comment