Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
100399 汤弘毅 美丽数 C++ Time Limit Exceeded 1000 MS 268 KB 281 2024-12-07 17:12:48

Tests(0/1):


Code:

#include <iostream> using namespace std; int main(){ int n; while(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"; } }