1.打擂台 简单的小代码,打擂台.纪念下过去,祝福下新人. public static void main(String[] args){ int[] ld = {1,4,2,10,8,9,5}; int max = ld[0]; for(int i = 1;i<ld.length;i++){ if(ld[i]>max){ max=ld[i]; } } System.out.print(max); } 2.冒泡排序 还是简单的小代码,冒泡排序.纪念下过去,祝福下新人. public stati
Description The number 151 is a prime palindrome because it is both a prime number and a palindrome (it is the same number when read forward as backward). Write a program that finds all prime palindromes in the range of two supplied numbers a and b (
PAT 1079. 延迟的回文数 给定一个 k+1 位的正整数 N,写成 ak...a1a0 的形式,其中对所有 i 有 0 <= ai < 10 且 ak > 0.N 被称为一个回文数,当且仅当对所有 i 有 ai = ak-i.零也被定义为一个回文数. 非回文数也可以通过一系列操作变出回文数.首先将该数字逆转,再将逆转数与该数相加,如果和还不是一个回文数,就重复这个逆转再相加的操作,直到一个回文数出现.如果一个非回文数可以变出回文数,就称这个数为延迟的回文数.(定义翻译自 https
Let's say a positive integer is a superpalindrome if it is a palindrome, and it is also the square of a palindrome. Now, given two positive integers L and R(represented as strings), return the number of superpalindromes in the inclusive range [L, R].