| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 161109 | 格林老师 | 美丽数 | C++ | Accepted | 25 MS | 1072 KB | 475 | 2026-09-30 16:01:52 |
#include <bits/stdc++.h> using namespace std; long long a[100001]; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int cnt=1; for (long long i=1;;i++){ if (i%3==0 || i%5==0){ a[cnt]=i; cnt++; if (cnt>100000) break; } } int N; while(cin>>N){ cout<<a[N]<<'\n'; // 建议用'\n',不要endl;endl会强制刷新缓冲区,慢! } return 0; }