Print the sum of all odd digits and even digits separately in a number.
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 (1 <= N <= 10), print first N rows of Pascal's triangle with space-separated numbers. 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 1 1 1 2 1 1 3 3 1
Explanation: Sample execution for input 4