oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

meowrings Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

meowrings.html

Problem Description

Rar the Cat has recently bought a pair of rings for him and his partner! To signify the deep love between them, the sum of all the prime factors of Rar the Cat's ring number will be the number inscribed on his partner's ring. How meaningful!

However, as usual, the careless Rar, in his excitement to propose to his new love, accidentally dropped his partner's ring into the drain. Oh No! Rar the Cat now has no idea what was the original number on his partner's ring. Given the number inscribed on Rar the Cat's ring, help Rar by telling him the new number he should inscribe on his partner's ring.

Input

The input will contain one integer, N, the number on Rar's ring. The input should end with a newline.

Output

The output should contain one integer, the number that should be inscribed on his partner's ring. The output should end with a newline.

Limits

Subtask 1 (30%): 1 <= N <= 1,000
Subtask 2 (70%): 1 <= N <= 1,000,000

Sample Input 1

68

Sample Output 1

21

Tags

Number Theory

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
13041s64MBMinimum
27061s64MBMinimum
3011s64MBMinimum

Judge Compile Command

g++-8 ans.cpp -o meowrings -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.