首页 > 解决方案 > 即使使用正确的语法和正确的 poutput,python 3.0 中的 eof

问题描述

我正在使用正确的输入语句并为代码提供正确的输入,然后它也给出了 NZEC 错误。请任何人也可以帮助使用 python 3

def fun():
    T=int(input())
    for i in range(T):
        H,P=map(int,input().split())
        while (H > P):
            H = H - P
            P = P / 2
            if (H == 0):
                print(1)
                break
            elif (P == 0):
                print(0)
                break
        if (H < P):
            print(1)

        # H = 0
        # P = 0

fun()

标签: python

解决方案


尝试更改H,P=map(int,input().split())H,P=map(int,input().strip().split())


推荐阅读