3 条题解

  • 1
    @ 2019-08-15 12:29:44
    #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

    #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

    #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
1087
难度
6
分类
(无)
标签
递交数
765
已通过
188
通过率
25%
被复制
9
上传者