Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
33357 | 刘西贤 | 【J】T3小清新签到题 | C++ | 运行超时 | 0 | 1000 MS | 248 KB | 376 | 2024-10-07 17:29:18 |
#include<iostream> #include<bits/stdc++.h> using namespace std; int main() { int f; cin>>f; for(int i=1; i<=f; i++) { int n,m,k,ans=0,cnt=1; cin>>n>>m>>k; while(1) { cnt++; if(cnt%n==0||cnt%m==0) { if(cnt%n==0&&cnt%m==0) { } else { ans++; } } if(ans==k) { cout<<cnt<<endl; break; } } } return 0; }