python中自然也可以像其他语言中进行整除和取模,在python中尤其要注意代码的格式和if语句的使用,稍有不但,程序逻辑就会出错。
#!usr/bin/env python 3.6
# -*- coding: -utf8- -*-
x=input()
a=int(x[0])
b=int(x[2])
c=a%b
if c==0:
print('YES')
else:
print('NO')
python中自然也可以像其他语言中进行整除和取模,在python中尤其要注意代码的格式和if语句的使用,稍有不但,程序逻辑就会出错。
#!usr/bin/env python 3.6
# -*- coding: -utf8- -*-
x=input()
a=int(x[0])
b=int(x[2])
c=a%b
if c==0:
print('YES')
else:
print('NO')
转载于:https://www.cnblogs.com/fyhsACr/p/6927094.html