Print all Armstrong numbers between 1 and 1000.
Difficulty: Medium
Phase: 6 · Mixed Logical Challenges
XP Reward: 20 XP
Topics: Mixed Logical Challenges, Medium
Supported Languages: Python, JavaScript, C, C++, Java
Problem Description
Given N, print spiral matrix of numbers 1 to N^2 of size N x N. Input Format: Read input from standard input (stdin). Output Format: Print the result to standard output (stdout).
Constraints
- -10^9 <= N <= 10^9
Examples
Example 1
Input: 3
Output: 1 2 3 8 9 4 7 6 5
Explanation: Sample execution for input 3