文章目录
P5742 题目要求
- P5742 题目要求
- P5742 AC代码(Java语言描述)
- P5743 题目要求
- P5743 AC代码(Java语言描述)
- P5744 题目要求
- P5744 AC代码(Java语言描述)
P5742题目链接
import java.util.Scanner;
public class Main {
private static class Student {
private int id;
private int grade1;
private int grade2;
private double grade;
Student(int id, int grade1, int grade2) {
this.id = id;
this.grade1 = grade1;
this.grade2 = grade2;
this.grade = grade1 * 0.7 + grade2 * 0.3;
}
public String isExcellent() {
return (grade1+grade2>140 && grade>=80) ? "Excellent" : "Not excellent";
}
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int num = scanner.nextInt();
for (int i = 0; i
关注
打赏
热门博文
- 【Linux】Ubuntu20.04安装和卸载MySQL8
- 【Linux】Ubuntu 20.04 报错 curl: (23) Failure writing output to destination 的解决方法
- 【Java】JUnit 4.13.2 警告 ‘assertEquals(double, double)‘ is deprecated 的解决方法
- 【JavaScript】处理 @parcel/transformer-js: Browser scripts cannot have imports or exports.
- 【Node.js】Windows环境安装配置NVM和Node.js
- 【Python】处理TypeError: Plain typing.NoReturn is not valid as type argument
- 【Python】Matplotlib可视化50例
- 【C语言】C语言修改MySQL数据库
- 【Java】从默认包导入类和对象报错的解决方法
- 【Java】panel.getGraphics()报错空指针异常的解决方法