728x90
반응형

VERSION 2.0

import sys

A = list(sys.stdin.readline().rstrip())

A = sorted(list(map(int , A)) , reverse= True)
print("".join(map(str, A)))

==> "".join(map(srt, A)) ==> 형태 기억하기!!

 

 

VERSION 1.0

import sys

a = list(sys.stdin.readline().rstrip())

b = sorted(a ,reverse=True)
for i in b:
    print(i,end='')

a  = ['2' ,'1','4' ,'3']

 

a값 리스트로 받는거 추후 정리!!!!!!

==>

https://knowallworld.tistory.com/112

 

★코테에서 꼭 쓰이는★ 헷갈리는 문자열 정리

import sys #입력 216 N = int(sys.stdin.readline()) print(N) #출력 : 216 print(list(map(int,str(N)))) #출력 : [2,1,6] #입력 216 M = list(map(int ,sys.stdin.readline().rstrip())) print(M) #출력 : [2,1,6] O = list(map(str, sys.stdin.readline().rstri

knowallworld.tistory.com

 

728x90
반응형

+ Recent posts