import java.util.Scanner; public class Main5 { public static void main(String[] args) { Scanner input = new Scanner(System.in); int number = input.nextInt(); int last = number % 10; int shengxia = number/10; int second = shengxia%10; shengxia = shengxia/10; int third = shengxia %10; int sum = last + second+third; System.out.println(sum); } }
时间: 2024-10-12 13:23:38