Skip to content

Instantly share code, notes, and snippets.

@Svastikkka
Created June 21, 2020 02:17
Show Gist options
  • Save Svastikkka/09e616413b5df586a9488455837baaa1 to your computer and use it in GitHub Desktop.
Save Svastikkka/09e616413b5df586a9488455837baaa1 to your computer and use it in GitHub Desktop.
## Read input as specified in the question.
## Print output as specified in the question.
num=int(input())
for i in range(1,num+1):
for j in range(0,i):
x=i-1
if x==0:
print(1,end="")
else:
if x==j or j==0:
print(1,end="")
else:print(2,end="")
print("")
@Svastikkka
Copy link
Author

Number Pattern 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment