2 条题解

  • 0

    #include <stdio.h>
    int main() {
    int n, a, b, ans;
    while (scanf("%d", &n) == 1) {
    a = n;
    b = n;
    ans = n;
    while (a >= 3 || b >= 4) {
    n = a / 3 + b / 4;
    a = a % 3 + n;
    b = b % 4 + n;
    ans += n;
    }
    printf("%d\n", ans);
    }
    return 0;
    }

  • -3
    @ 2021-10-29 15:57:55

    #include <stdio.h>
    int main() {
    int n, a, b, ans;
    while (scanf("%d", &n) == 1) {
    a = n;
    b = n;
    ans = n;
    while (a >= 3 || b >= 4) {
    n = a / 3 + b / 4;
    a = a % 3 + n;
    b = b % 4 + n;
    ans += n;
    }
    printf("%d\n", ans);
    }
    return 0;
    }

  • 1

信息

ID
1040
难度
4
分类
(无)
标签
递交数
146
已通过
62
通过率
42%
上传者