Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

bellcode / lesson3-1-1_DIY1

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • lesson3-1-1_DIY1
  • 3.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    auto save · e60acedf
    BellCodeEditor committed 2 years ago
    e60acedf
3.py 192 Bytes
Edit
1 2 3 4 5 6 7 8 9 10 11 12 13 14
n=int(input())
c=0
a=[]
b=[]
for i in range(n):
    a.append(i+1)
print(a)
while len(a)!=1:
    a.append(a.pop(0))
    c=c+1
    if c==3:
        a.pop(0)
        c=1    
print(a)