Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
45110 | wuxinyue | 数字反转 | C++ | Accepted | 0 MS | 244 KB | 244 | 2024-04-09 20:39:02 |
#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; }