답안 #501134

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
501134 2022-01-02T12:29:45 Z Doj04 Bubble Sort 2 (JOI18_bubblesort2) C++14
컴파일 오류
0 ms 0 KB
def bubbleSort(alist):
    for passnum in range(len(alist)-1,0,-1):
        for i in range(passnum):
            if alist[i]>alist[i+1]:
                temp = alist[i]
                alist[i] = alist[i+1]
                alist[i+1] = temp

alist = [54,26,93,17,77,31,44,55,20]
bubbleSort(alist)
print(alist)

Compilation message

bubblesort2.cpp:1:1: error: 'def' does not name a type
    1 | def bubbleSort(alist):
      | ^~~