本文整理汇总了Python中checker.Checker.readInts方法的典型用法代码示例。如果您正苦于以下问题:Python Checker.readInts方法的具体用法?Python Checker.readInts怎么用?Python Checker.readInts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类checker.Checker
的用法示例。
在下文中一共展示了Checker.readInts方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from checker import Checker [as 别名]
# 或者: from checker.Checker import readInts [as 别名]
def main():
ch = Checker()
while True:
n, p = ch.readInts(2)
if n == 0 and p == 0:
break
ch.checkRange(n, MIN, N_MAX, 'N')
ch.checkRange(p, MIN, P_MAX, 'P')
ts = ch.readInts(n)
for t in ts:
ch.checkRange(t, MIN, T_MAX, 'T')
示例2: main
# 需要导入模块: from checker import Checker [as 别名]
# 或者: from checker.Checker import readInts [as 别名]
def main():
ch = Checker()
while True:
r, n = ch.readInts(2)
if r == 0 and n == 0:
break
ch.checkRange(r, R_MIN, R_MAX, 'R')
ch.checkRange(n, N_MIN, N_MAX, 'N')
xs = ch.readInts(n)
ch.checkSorted(xs, 'Xs')
ch.checkUnique(xs, 'Xs')
for x in xs:
ch.checkRange(x, X_MIN, X_MAX, 'X')
示例3: main
# 需要导入模块: from checker import Checker [as 别名]
# 或者: from checker.Checker import readInts [as 别名]
def main():
ch = Checker()
while True:
coefficients = ch.readInts(4)
if coefficients == [0, 0, 0, 0]:
break
for i in xrange(len(coefficients)):
ch.checkRange(coefficients[i], MIN, MAX, chr(ord('A') + i))
示例4: main
# 需要导入模块: from checker import Checker [as 别名]
# 或者: from checker.Checker import readInts [as 别名]
def main():
ch = Checker()
while True:
a, b = ch.readInts(2)
if a == 0 and b == 0:
break
ch.checkRange(a, MIN, MAX, 'A')
ch.checkRange(b, MIN, MAX, 'B')
示例5: main
# 需要导入模块: from checker import Checker [as 别名]
# 或者: from checker.Checker import readInts [as 别名]
def main():
ch = Checker()
while True:
n = ch.readInt()
if n == 0:
break
ch.checkRange(n, MIN, N_MAX, 'N')
as_ = ch.readInts(n)
for a in as_:
ch.checkRange(a, MIN, A_MAX, 'A')
示例6: main
# 需要导入模块: from checker import Checker [as 别名]
# 或者: from checker.Checker import readInts [as 别名]
def main():
ch = Checker()
while True:
n = ch.readInt()
if n == 0:
break
ch.checkRange(n, N_MIN, N_MAX, 'N')
ts_ = ch.readInts(n)
for t in ts_:
ch.checkRange(t, T_MIN, T_MAX, 'T')