**16675-두 개의 손 (python, 파이썬)
""" S, R, P: 가위, 바위, 보 """ ML, MR, TL, TR = ('SRP'.index(i) for i in input().split()) if ML == MR and (ML+1) % 3 in [TL, TR]: print("TK") elif TL == TR and (TL+1) % 3 in [ML, MR]: print("MS") else: print("?")
2020. 10. 17.
**1074-Z (python, 파이썬)
N, r, c = map(int, input().split()) def Z(msize, x, y): if msize == 1: return 0 msize //= 2 for i in range(2): for j in range(2): if x < msize * (i+1) and y < msize * (j+1): return (i*2+j) * msize * msize + Z(msize, x-msize*i, y-msize*j) print(Z(2 ** N, r, c))
2020. 10. 16.