목록Python (215)
가오리의 코딩일기
# 런타임 에러 N = int(input()) sum = 0 for i in range(N): sum += int(input().split()) print(sum - (N-1)) N = int(sys.stdin.readline()) sum = 0 for i in range(N): sum += int(sys.stdin.readline()) print(sum - (N-1))
T = int(input()) for i in range(T): s = int(input()) n = int(input()) for _ in range(n): q, p = map(int,input().split()) s += q*p print(s)
n = int(input()) for i in range(1, n): print('*'*i) for i in range(n, 0, -1): print('*'*i)
n = int(input()) for i in range(1, n): print(' '*(n-i)+'*'*i) for i in range(n, 0, -1): print(' '*(n-i)+'*'*i)
n = int(input()) for i in range(1, n): print(' '*(n-i)+'*'*(2*i -1)) for i in range(n, 0, -1): print(' '*(n-i)+'*'*(2*i-1))
N = int(input()) for i in range(N, 0, -1): print(' '*(N-1)+"*"*(2*i-1))
N = int(input()) result = 0 for _ in range(N): s, a = map(int,input().split()) result = a%s + result print(result)
T = int(input()) for i in range(T): N = int(input()) c = 0 g = 0 for i in range(N): C, G = map(str, input().split()) c += int(C) g += float(C)*float(G) g = round(g/c,1) print(c, g)
total = int(input()) for _ in range(9): knows = int(input()) total -= knows print(total)