Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
136242 彭士宝 美丽数 C++ Time Limit Exceeded 1000 MS 1176 KB 374 2025-11-09 22:32:16

Tests(0/1):


Code:

#include<bits/stdc++.h> using namespace std; int main() { 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) { cout << beautiful_numbers[N - 1] << endl; } return 0; }