Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
123315 唐钧 Blah数集 C++ 通过 100 0 MS 384 KB 654 2024-01-22 20:13:32

Tests(10/10):


#include<bits/stdc++.h> using namespace std; int x,tot=1; int main() { int x,n; while(cin>>x&&cin>>n) { tot=1; queue<int>a; queue<int>b; while(tot<n) { a.push(2*x+1); b.push(3*x+1); if(a.front()>b.front()) { x=b.front(); b.pop(); } else if(a.front()<b.front()) { x=a.front(); a.pop(); } else { x=a.front(); a.pop(); b.pop(); } tot++; } cout<<x<<endl; } return 0; }


测评信息: