class Solution: def isPalindrome(self, x: int) -> bool: a = x if a<0: return False else: num = 0 while(a!=0): temp = a%10 a = a//10 num = num*10+temp if num==x: return True else: return False…
关注博客园很久,今天是第一次写博客.先附上一个C题目:写一个函数判断一个整数是否为完全平方数,同时是否该数的各位数至少两个相同的数字 #include <stdio.h> #include <math.h> int IsTheNumber ( const int N ); int main() { int n1, n2, i, cnt; scanf("%d %d", &n1, &n2); cnt = ; for ( i=n1; i<=n2;…