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

Tests(0/1):


Code:

#include <iostream> using namespace std; int main(){ int n; int a[100005]; int c=0; int t=0,f=0; int bn; int flag; for(int i =1;c<100000;++i){ if(i%3==0||i%5==0){ a[c++] = i; } } while(cin>>n){ cout<<a[n-1]<<"\n"; } }