3297. 期末预测之安全指数

摘要
Title: 3297. 期末预测之安全指数
Tag: 模拟
Memory Limit: 64 MB
Time Limit: 1000 ms

Powered by:NEFU AB-IN

Link

3297. 期末预测之安全指数

  • 题意

    见原题

  • 思路

    模拟

  • 代码

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    '''
    Author: NEFU AB-IN
    Date: 2022-03-17 17:13:23
    FilePath: \ACM\Acwing\3297.py
    LastEditTime: 2022-03-17 17:13:24
    '''
    n = int(input())
    ans = 0
    for i in range(n):
    w, score = map(int, input().split())
    ans += w * score
    print(max(0, ans))
使用搜索:谷歌必应百度