Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
8156 | D班-西瓜 | 寂寞的数 | C++ | 编译错误 | 0 | 0 MS | 0 KB | 319 | 2025-03-26 17:49:29 |
#include <bits/stdc++.h> using namespace std; int a[100010]; int main() { int n; cin >> n; for(int i = 1; i<=n; i++) { int sum=temp=i; while(temp>0) { sum += temp%10; temp /= 10; } a[sum]=1; } for(int i = 1; i<=n; i++) { if(a[i]==0) { cout << i << endl; } } return 0; }