Untitled
unknown
c_cpp
23 days ago
269 B
2
Indexable
Never
#include <iostream> using namespace std; int count(int a, int i = 0) { while (a) { a /= 10; i++; } return i; } int main() { int a, n, max = 0; cin >> n; while (n) { cin >> a; if (count(a) > max) max = a; n--; } cout << max; }
Leave a Comment