Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
34403 swzzzz 【S】T4 C++ 运行超时 30 2000 MS 256 KB 312 2024-11-07 18:37:11

Tests(3/10):


#include<bits/stdc++.h> using namespace std; long long a,n,m; int f(long long x){ int ans=0; while(x){ ans=max(ans,int(x%10)); x/=10; } return ans; } int main(){ cin>>a>>m>>n; n--; while(n--){ a=(a+f(a))%m; } cout<<a; return 0; }


测评信息: