题目
import java.util.Scanner;public class Main {public static int func(int res) {int sum 0;while(res!0) {int s res%10;sums;res/10;}return sum;}public static void main(String[] args) {Scanner sc new Scanner(System.in);int t sc.nextInt();sc.nextLine();…