當前位置: 首頁>>代碼示例>>Python>>正文


Python Checker.readInts方法代碼示例

本文整理匯總了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')
開發者ID:AI-comp,項目名稱:Orientation2014Problems,代碼行數:15,代碼來源:validator.py

示例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')
開發者ID:AI-comp,項目名稱:Orientation2014Problems,代碼行數:17,代碼來源:validator.py

示例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))
開發者ID:AI-comp,項目名稱:Orientation2014Problems,代碼行數:11,代碼來源:validator.py

示例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')
開發者ID:AI-comp,項目名稱:Orientation2014Problems,代碼行數:11,代碼來源:validator.py

示例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')
開發者ID:AI-comp,項目名稱:Orientation2014Problems,代碼行數:14,代碼來源:validator.py

示例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')
開發者ID:AI-comp,項目名稱:Orientation2014Problems,代碼行數:14,代碼來源:validator.py


注:本文中的checker.Checker.readInts方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。