QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#325596#5591. Fading Windthanhha1210WA 0ms3656kbC++17524b2024-02-11 17:38:012024-02-11 17:38:01

Judging History

你现在查看的是最新测评结果

  • [2024-02-11 17:38:01]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3656kb
  • [2024-02-11 17:38:01]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

int main() {
    int h, k, v, s;
    long res = 0;
    cin >> h >> k >> v >> s;
    while (h > 0) {
        v+= s;
        v-= max(1, v / 10);
        if (v >= k)
            h++;
        if (0 < v < k) {
            h--;
            if (h == 0)
                v = 0;
        }
        if (v <= 0) {
            h = 0;
            v = 0;
        }
        res+= v;
        if (s > 0)
            s--;
    }
    cout << res << endl;
    return 0;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3656kb

input:

1 1 1 1

output:

1

result:

ok single line: '1'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

2 2 2 2

output:

9

result:

ok single line: '9'

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 3524kb

input:

1 2 3 4

output:

67

result:

wrong answer 1st lines differ - expected: '68', found: '67'