1 条题解

  • 1
    @ 2024-7-17 11:31:19

    #include <bits/stdc++.h> using namespace std; bool chk(int a){ if(a%70){ return true; } while(a){ if(a%107) return true; a=a/10; } return false; } int main(){ int n,m,t; cin>>n>>m>>t; queue<string> q; string tmp; for(int i=0;i<n;i++){ cin>>tmp; q.push(tmp); } for(int i=0;i<m-1;i++){ tmp = q.front(); q.pop(); q.push(tmp); } while(q.size() != 1){ tmp = q.front(); q.pop(); if(!chk(t++)) q.push(tmp); } cout<<q.front(); return 0; } hope it can help u

    • 1

    信息

    ID
    136
    时间
    1000ms
    内存
    256MiB
    难度
    4
    标签
    (无)
    递交数
    82
    已通过
    39
    上传者