Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
100390 | 汤弘毅 | 美丽数 | C++ | Time Limit Exceeded | 1000 MS | 272 KB | 271 | 2024-12-07 17:06:48 |
#include <iostream> using namespace std; int main(){ int n; while(1){ cin>>n; int t=0,f=0; int bn; while(n>0){ if(t+3<f+5){ t = t+3; bn = t; } else{ f = f+5; bn=f; } n = n-1; } cout<<bn<<"\n"; } }