389.找不同
题目链接:389.找不同
给定两个字符串 s 和 t ,它们只包含小写字母。
字符串 t 由字符串 s 随机重排,然后在随机位置添加一个字母。
请找出在 t 中被添加的字母。 示例 1: 输入:s “abcd”, t “abcde…
题目
import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner sc new Scanner(System.in);int n sc.nextInt();int m sc.nextInt();int[][] f new int[n][m];for(int i0;i<n;i) {for(int j0;j<m;j) {f[i][j] sc.nextInt()…
题目
import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner sc new Scanner(System.in);String str sc.nextLine();char[] c str.toCharArray();int n c.length;StringBuilder st new StringBuilder();int i 0;while(i<n)…