Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
45092 | wuxinyue | 分离整数的各个数 | C++ | Accepted | 1 MS | 252 KB | 250 | 2024-04-09 20:15:17 |
#include <bits/stdc++.h> using namespace std; int n,a[100005],i = 0; int main(){ cin >> n; int x = n; for(int x = n;x > 0;x = x / 10){ a[i] = x % 10; i ++; } for(int i1 = 0;i1 < i;i1 ++){ cout << a[i1] << " "; } return 0; }