본문 바로가기
python-algorithm

백준 15372 A Simple Problem.

by 무적김두칠 2022. 11. 30.

https://www.acmicpc.net/problem/15372

 

15372번: A Simple Problem.

For each test case, output a single line containing the integer K, the answer for that test case.

www.acmicpc.net

 

1
2
3
4
5
6
7
8
9
import sys
def sol(n):
    return n*n
 
if __name__ == '__main__':
    t = int(input())
    for _ in range(t):
        n = int(sys.stdin.readline())
        print(sol(n))
cs

sys.stdin.readline() 입력 받으셔야 시간초과 안떠요

반응형

'python-algorithm' 카테고리의 다른 글

백준 3060 욕심쟁이 돼지  (0) 2022.11.30
백준 25915 연세여 사랑한다  (0) 2022.11.30
백준 13623 Zero or One  (0) 2022.11.30
백준 25600 Triathlon  (0) 2022.11.29
백준 25881 Electric Bill  (0) 2022.11.29

댓글