zoukankan      html  css  js  c++  java
  • 第三题

    Source file

    01 #T3
    02 # 题目:一个整数,它加上100后是一个完全平方数,再加上168又是一个完全平方数,请问该数是多少?
    03 
    04 def cansqur(num):
    05     i=1
    06     while i*i <= num:
    07         if i*i == num:
    08             return True
    09         else:
    10             i += 1;
    11     return False
    12 
    13 someint=-100
    14 while cansqur(someint+100)==False or cansqur(someint+168)==False:
    15     someint+=1;
    16     print('the judge number is : '+str(someint));
    17 print('the answer is: '+str(someint));
    
    为更美好的明天而战!!!
  • 相关阅读:
    SAP SD 模块面试题
    商品ATP check FM(获得可用库存和总库存)
    获得SO的凭证流
    SAP XI 常用事务代码
    ABAP 面试问题及答案(一)(转)
    ABAP 面试题(转)
    SAP XI 3.0考试大纲
    Enterprise System Applicaiton 试题
    Enterprise Portal 试题
    ABAP 100 道面试题
  • 原文地址:https://www.cnblogs.com/lovely-bones/p/11382249.html
Copyright © 2011-2022 走看看