第三届“传智杯”全国大学生IT技能大赛(初赛B组)

本文详细介绍了第三届'传智杯'全国大学生IT技能大赛初赛B组的比赛内容,包括课程报名、期末考试成绩、志愿者、终端和运气五个部分,每个部分提供题意解析及代码实现。
摘要由CSDN通过智能技术生成

第三届“传智杯”全国大学生IT技能大赛(初赛B组)

A - 课程报名

题意:

题解:

**代码: **

#include <bits/stdc++.h>

using namespace std;

typedef long long LL;

LL n, v, m, a, cnt, res, floors;

int main() {
   
    scanf("%d%d%d%d", &n, &v, &m, &a);
    cnt = res = floors = 0;
    while (cnt <= n) {
   
        res += min(m, n - cnt) * (a * floors + v);
        cnt += m;
        floors++;
    }
    printf("%lld\n", res);
    return 0;
}

B - 期末考试成绩

题意:

题解:

**代码: **

#include <bits/stdc++.h>

using namespace std;

typedef long long LL;
typedef pair<int, int> PII;
int const MAXN = 2e5 + 10;
int n, m, T;

double func(int x) {
   
    if (x >= 90) return 4.0;
    else if (x >= 60) return 4.0 - 0.1 * (90 - x);
}

int main() {
   
    int n;
    cin >> n;
    
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值