①列表中显示的题目与打开超链接后显示的题目不一样
②实际题目是重复了的,以下代码就是昨晚做过的题,复制粘贴运行AC一气呵成
③奇偶数英语:奇数odd,偶数even
import java.util.Scanner;
/**
* @author Allen_Hua
* @create_time 创建时间:May 11, 2018 9:51:56 PM 类说明
*/
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
while (scan.hasNext()) {
int n = scan.nextInt();
int[] data = new int[n];
for (int i = 0; i < data.length; i++) {
data[i] = scan.nextInt();
}
int jiShu = 0, ouShu = 0;
for (int i = 0; i < data.length; i++) {
if (data[i] % 2 == 0) {
ouShu++;
} else {
jiShu++;
}
}
if (ouShu > jiShu) {
System.out.println("NO");
} else {
System.out.println("YES");
}
}
}
}
import java.util.Scanner;
/**
* Created by fhqplzj on 17-2-19 at 下午8:51.
*/
public class Trip {
private static String process(double x, int n) {
double y = x;
for (int i = 0; i < n; i++) {
y = 2.0 / 3 * y + x / (3 * y * y);
}
return String.format("%.6f", y);
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNextDouble()) {
double x = scanner.nextDouble();
int n = scanner.nextInt();
System.out.println(process(x, n));
}
}
}