Print a pattern where each row i prints i*i.
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 N rows where row i (1-indexed) prints i*i. 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: 4
Output: 1 4 9 16
Explanation: Sample execution for input 4