`{"id":"17a48d4d-e00f-4c90-b899-2d38d12610ce","name":"Pattern 13","description":"1. You are given a number n.\r\n2. You've to create a pattern as shown in output format","inputFormat":"A number n","outputFormat":"<img src=\"http://pepcoding.com/resources/ojquestionresource/images/pat131.JPG\" alt=\"pat131\">","constraints":"1 &lt;= n &lt;= 10","sampleCode":{"cpp":{"code":"#include <iostream>\r\nusing namespace std;\r\n\r\nint main(int argc, char **argv){\r\n int n;\r\n cin >> n;\r\n \r\n //write your code here\r\n \r\n}"},"java":{"code":"import java.util.*;\r\npublic class Main{\r\n public static void main(String[] args){\r\n Scanner scn = new Scanner(System.in);\r\n\r\n //write your code here\r\n\r\n }\r\n}"},"python":{"code":"import math\n\nn = int(input())\n\n# write your code here"}},"points":10,"difficulty":"easy","sampleInput":"5","sampleOutput":"1\t\r\n1\t1\t\r\n1\t2\t1\t\r\n1\t3\t3\t1\t\r\n1\t4\t6\t4\t1","questionVideo":"https://www.youtube.com/embed/zAnV4KZ6uDk","hints":[],"associated":[{"id":"1a923e70-a9b3-498d-84f8-3ea203ca2035","name":"what is the formula we are using in this pattern? (pattern 13)","slug":"what-is-the-formula-we-are-using-in-this-pattern-pattern-13","type":4},{"id":"986c1c31-3bd1-4481-8d73-444095fccfcc","name":"Is there any kind of symmetry between the elements in this pattern 13","slug":"is-there-any-kind-of-symmetry-between-the-elements-in-this-pattern-13","type":4},{"id":"b26b9652-6ed0-41ab-a741-828a359ad27b","name":"the pattern shown in the question is for (pattern 13)","slug":"the-pattern-shown-in-the-question-is-for-pattern-13","type":4},{"id":"f4069a69-285d-4ca6-b70f-ea16379c3829","name":"Pattern 13","slug":"pattern-13","type":4}],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"ca241a91-e685-4c63-9d83-892cf12c5576","name":"Patterns","slug":"patterns-9997","type":0},{"id":"245d7765-527f-4220-9a4a-3e3cab778b5d","name":"Pattern 13","slug":"pattern-13","type":1}],"next":{"id":"83c921b0-020c-4a72-925d-bb8a5a1fcf81","name":"Pattern 13","type":3,"slug":"pattern-13"},"prev":{"id":"0ed909f0-3c63-4a93-823e-99526fed93fc","name":"pattern 12","type":3,"slug":"pattern-12"}}}`

# Pattern 13

1. You are given a number n. 2. You've to create a pattern as shown in output format

`{"id":"17a48d4d-e00f-4c90-b899-2d38d12610ce","name":"Pattern 13","description":"1. You are given a number n.\r\n2. You've to create a pattern as shown in output format","inputFormat":"A number n","outputFormat":"<img src=\"http://pepcoding.com/resources/ojquestionresource/images/pat131.JPG\" alt=\"pat131\">","constraints":"1 &lt;= n &lt;= 10","sampleCode":{"cpp":{"code":"#include <iostream>\r\nusing namespace std;\r\n\r\nint main(int argc, char **argv){\r\n int n;\r\n cin >> n;\r\n \r\n //write your code here\r\n \r\n}"},"java":{"code":"import java.util.*;\r\npublic class Main{\r\n public static void main(String[] args){\r\n Scanner scn = new Scanner(System.in);\r\n\r\n //write your code here\r\n\r\n }\r\n}"},"python":{"code":"import math\n\nn = int(input())\n\n# write your code here"}},"points":10,"difficulty":"easy","sampleInput":"5","sampleOutput":"1\t\r\n1\t1\t\r\n1\t2\t1\t\r\n1\t3\t3\t1\t\r\n1\t4\t6\t4\t1","questionVideo":"https://www.youtube.com/embed/zAnV4KZ6uDk","hints":[],"associated":[{"id":"1a923e70-a9b3-498d-84f8-3ea203ca2035","name":"what is the formula we are using in this pattern? (pattern 13)","slug":"what-is-the-formula-we-are-using-in-this-pattern-pattern-13","type":4},{"id":"986c1c31-3bd1-4481-8d73-444095fccfcc","name":"Is there any kind of symmetry between the elements in this pattern 13","slug":"is-there-any-kind-of-symmetry-between-the-elements-in-this-pattern-13","type":4},{"id":"b26b9652-6ed0-41ab-a741-828a359ad27b","name":"the pattern shown in the question is for (pattern 13)","slug":"the-pattern-shown-in-the-question-is-for-pattern-13","type":4},{"id":"f4069a69-285d-4ca6-b70f-ea16379c3829","name":"Pattern 13","slug":"pattern-13","type":4}],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"ca241a91-e685-4c63-9d83-892cf12c5576","name":"Patterns","slug":"patterns-9997","type":0},{"id":"245d7765-527f-4220-9a4a-3e3cab778b5d","name":"Pattern 13","slug":"pattern-13","type":1}],"next":{"id":"83c921b0-020c-4a72-925d-bb8a5a1fcf81","name":"Pattern 13","type":3,"slug":"pattern-13"},"prev":{"id":"0ed909f0-3c63-4a93-823e-99526fed93fc","name":"pattern 12","type":3,"slug":"pattern-12"}}}`

Editor

# Pattern 13

easy

1. You are given a number n. 2. You've to create a pattern as shown in output format

1 <= n <= 10

A number n

## Example

Sample Input

`.css-23h8hz{color:inherit;font-size:0.875rem;line-height:1.125rem;letter-spacing:0.016rem;font-weight:var(--chakra-fontWeights-normal);white-space:pre-wrap;}5`

### Sample Output

```.css-3oaykw{color:var(--chakra-colors-active-primary);font-size:0.875rem;line-height:1.125rem;letter-spacing:0.016rem;font-weight:var(--chakra-fontWeights-normal);white-space:pre-wrap;font-family:Monospace;}1 1 1 1 2 1 1 3 3 1 1 4 6 4 1```

Question Video

Discussions

Show Discussion

Related Resources