Daily C++ Olympiad Problem

Determine whether a number is a Narcissistic number (a Narcissistic number is a three-digit number whose digits’ cubes sum up to the number itself). Input format: A single line containing an integer Output format: If it is a Narcissistic number, output “Yes“, otherwise output “No“ Input example #1:153 Output example #1:Yes A video explanation of … Read more

C++ Practice Problem – ‘Narcissistic Number’ Problem 2

C++ Practice Problem - 'Narcissistic Number' Problem 2

Time Limit: 2s Memory Limit: 192MB Problem Description Output all “Narcissistic Numbers”. A “Narcissistic Number” is a three-digit number such that the sum of the cubes of its digits equals the number itself. For example: 371 is a “Narcissistic Number” because 371 = 3^3 + 7^3 + 1^3. Input Format None Output Format Output all … Read more

C++ Practice Problem – ‘Narcissistic Number’ Problem 1

C++ Practice Problem - 'Narcissistic Number' Problem 1

Time Limit: 2s Memory Limit: 192MB Problem Description Determine whether a number is a “Narcissistic number”. A “Narcissistic number” is defined as a three-digit number where the sum of the cubes of its digits equals the number itself. For example: 371 is a “Narcissistic number” because 371 = 3^3 + 7^3 + 1^3. Input Format … Read more