题意描述
题目来源链接
分析这孩子着实恐怖诶,竟然积累怒气值,差点害我WAWA大哭~~
我们要注意分析,这个题不能简单的将“怒气值”累加然后减去8*天数,这么玩不行,因为好心情不会累计……嗯?不对,这个好心情也能累计……这太水了……
貌似简单累加就能AC?。。。
算了,放代码:
AC代码(Java语言描述)import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int sumi = 0;
int sum = 0;
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
if (n
关注
打赏
热门博文
- 【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.
- 【Python】处理TypeError: Plain typing.NoReturn is not valid as type argument
- 【Python】Matplotlib可视化50例
- 【C语言】C语言修改MySQL数据库
- 【Java】从默认包导入类和对象报错的解决方法
- 【Java】panel.getGraphics()报错空指针异常的解决方法
- 【Java】IDEA编译Java项目报错 java: 找不到符号 的解决方法