| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 136243 | 彭士宝 | 美丽数 | C++ | Time Limit Exceeded | 1000 MS | 1176 KB | 496 | 2025-11-09 22:32:54 |
#include <iostream> #include <vector> using namespace std; int main() { // 预处理前100000个美丽数 vector<int> beautiful_numbers; for (int i = 1; beautiful_numbers.size() < 100000; ++i) { if (i % 3 == 0 || i % 5 == 0) { beautiful_numbers.push_back(i); } } // 处理多组输入 int N; while (cin >> N) { // 输出第N个美丽数 cout << beautiful_numbers[N - 1] << endl; } return 0; }