제출 #1196489

#제출 시각아이디문제언어결과실행 시간메모리
1196489ofozIntercastellar (JOI22_ho_t1)C++20
컴파일 에러
0 ms0 KiB
from sys import stdout, setrecursionlimit
from math import ceil, floor, sqrt

def cnt_two(x: int):
    res = 0
    i = 0
    while x % 2 == 0:
        res += 1
        x //= 2
        i += 1
        if i >= 100: break

    return (res, x)


def solve():
    n = int(input())
    a = []
    for _ in range(n): a.append(int(input()))
    q = int(input())
    queries = []
    for _ in range(q): queries.append(int(input()))

    last = -1
    i = 0
    j = 0
    cur = 0
    c = 0
    while i < n and j < q:
        x = queries[j]
        if x <= cur:
            print(last)
            j += 1
            continue

        cnt, after = cnt_two(a[i])
        cur += (1<<cnt)
        last = after
        i += 1
        if x <= cur:
            print(last)
            j += 1

        c += 1
        if c >= 100: break









solve()

컴파일 시 표준 에러 (stderr) 메시지

Main.cpp:1:1: error: 'from' does not name a type
    1 | from sys import stdout, setrecursionlimit
      | ^~~~