• CodeForces 1194A : Remove a Progression


    题目链接:https://vjudge.net/problem/CodeForces-1194A
      往后发现每回都只有偶数被留下来,而且第n个数就是2*n

    #include<set>
    #include<map>
    #include<stack>
    #include<queue>
    #include<cmath>
    #include<cstdio>
    #include<cctype>
    #include<string>
    #include<vector>
    #include<climits>
    #include<cstring>
    #include<cstdlib>
    #include<iostream>
    #include<algorithm>
    #define max(a, b) (a > b ? a : b)
    #define min(a, b) (a < b ? a : b)
    #define mst(a) memset(a, 0, sizeof(a))
    #define _test printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n")
    using namespace std;
    typedef long long ll;
    typedef pair<int, int> P;
    const double eps = 1e-7;
    const int INF = 0x3f3f3f3f;
    const ll ll_INF = 233333333333333;
    const int maxn = 1e3 + 10;
    int main(void) {
        int t;
        scanf("%d", &t);
        while(t--) {
            ll n, k;
            scanf("%lld%lld", &n, &k);
            printf("%lld\n", 2*k);
        }
        return 0;
    }
    
  • 相关阅读:
    C#动态显示时间
    死锁问题
    TCP_NODELAY算法使用事项
    二叉搜索树的后序遍历
    从上到下打印二叉树
    栈的压入、弹出序列
    包含min函数的栈
    顺时针打印矩阵
    树的子结构
    合并两个排序链表
  • 原文地址:https://www.cnblogs.com/shuitiangong/p/12266518.html
Copyright © 2020-2023  润新知