1 条题解
-
0
import java.util.Scanner; public class Main { public static void main(String[] args) { final Scanner scanner = new Scanner(System.in); final double minimum = scanner.nextDouble(); scanner.nextLine(); final String a = scanner.nextLine(), b = scanner.nextLine(); final int length = a.length(); int same = 0; for (int i = 0; i < length; i++) { if (a.charAt(i) != b.charAt(i)) continue; same++; } double rate = (double) same / length; System.out.println(rate >= minimum ? "yes" : "no"); } }
- 1
信息
- ID
- 132
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 7
- 标签
- (无)
- 递交数
- 1148
- 已通过
- 240
- 上传者