Question: Swiss Re, Recently Asked Online Assessments in 29 Aug, 2025 | Password Generator (Sum of Divisors)
0
Entering edit mode

Question: File Password Generator (Sum of Divisors)

Problem Statement:

John, an information security consultant, recently joined an organization. He noticed that employees were sending files as email attachments without any password protection. He advised them to enhance security by using passwords for their files and emphasized not to share the password in the same email. His recommendation was to use a number as the password for the file.

To facilitate this process, John suggested including a number N in the email body, which could be used to generate the password. Clients wanting to open the file would need to identify all the numbers that can evenly divide N. The sum of these divisors will serve as the password to access the file.

As a software developer in the organization, you have been tasked with creating a webpage where clients can input N and receive the corresponding password to open the file.

Read the input from STDIN and print the output to STDOUT. Do not write arbitrary strings while reading the input or while printing, as these contribute to the standard output.

Constraints:

  • 0 < N < 10000

Input Format:

  • The input contains an integer, N, the number specified in the email.

Output Format:

  • The output contains the password of the file.
ADD COMMENTlink 6 hours ago Rohit • 20

Login before adding your answer.

Similar Posts
Loading Similar Posts