import java.util.*; /* * 输入一个整数,计算它各位上数字的和. * (注意:是任意位的整数) */ public class Sum02 { public static void main(String[] args) { System.out.print("请输入任意一个整数:"); Scanner s = new Scanner(System.in); int sum = 0; int t = s.nextInt(); while(t!=0){ sum =
You are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number of smaller elements to the right of nums[i]. Example: Given nums = [5, 2, 6, 1] To the right of 5 there are
Problem D: LC-Display Time Limit: 1 Sec Memory Limit: 64 MBSubmit: 14 Solved: 3[Submit][Status][Web Board] Description A friend of yours has just bought a new computer. Before this, the most powerful machine he ever used was a pocket calculator. He
You are given an integer array nums and you have to return a new counts array. The countsarray has the property where counts[i] is the number of smaller elements to the right of nums[i]. Example: Input: [5,2,6,1] Output: [2,1,1,0] Explanation: To the