哈囉大家好,
我真心不知道自己错在哪里
我写的可以通过第一个测试
但第二个又挂掉
纠结了几天 没办法来向大家求教
感谢各位高手!
Write a program that reads two positive integers a and b on separate lines.
If a is divisible by b, print the message "divisible". Otherwise, print the
message "not divisible".
我的code:
a=int(input()[0])
b=int(input()[-1])
a>0
b>0
if a%b==0:
print("divisible")
else:
print("not divisible")
我的感觉是没什么问题吧
但通过了第一个测试
第二个就跟我说答案错误
请问我是否忽略了什么细节呢?
大家端午节快乐!