Submission #10161698
Source Code Expand
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using ld = long double; const int INF = (1<<30)-1; const long long LINF = (1LL<<62)-1; const long double PI = acos(-1.0L); const int dx[] = {-1, 0, 1, 0}; const int dy[] = {0, 1, 0, -1}; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } vector<long long> divisor(long long n) { vector<long long> res; for (long long i = 1; i * i <= n; i++) { if (n % i == 0) { res.push_back(i); if (n / i != i) res.push_back(n / i); } } sort(res.begin(), res.end()); return res; } signed main() { ios::sync_with_stdio(false); cin.tie(0); ll n; cin >> n; auto div = divisor(n); ll num = div[div.size()/2], ans = 0; while (num) { num /= 10; ans++; } cout << ans << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Digits in Multiplication |
User | Noze |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 1027 Byte |
Status | AC |
Exec Time | 2 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | sample_01.txt, sample_02.txt, sample_03.txt, subtask_1_1.txt, subtask_1_10.txt, subtask_1_11.txt, subtask_1_12.txt, subtask_1_2.txt, subtask_1_3.txt, subtask_1_4.txt, subtask_1_5.txt, subtask_1_6.txt, subtask_1_7.txt, subtask_1_8.txt, subtask_1_9.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 1 ms | 256 KB |
sample_02.txt | AC | 1 ms | 256 KB |
sample_03.txt | AC | 2 ms | 256 KB |
subtask_1_1.txt | AC | 1 ms | 256 KB |
subtask_1_10.txt | AC | 2 ms | 256 KB |
subtask_1_11.txt | AC | 1 ms | 256 KB |
subtask_1_12.txt | AC | 1 ms | 256 KB |
subtask_1_2.txt | AC | 1 ms | 256 KB |
subtask_1_3.txt | AC | 2 ms | 256 KB |
subtask_1_4.txt | AC | 2 ms | 256 KB |
subtask_1_5.txt | AC | 2 ms | 256 KB |
subtask_1_6.txt | AC | 2 ms | 256 KB |
subtask_1_7.txt | AC | 2 ms | 256 KB |
subtask_1_8.txt | AC | 2 ms | 256 KB |
subtask_1_9.txt | AC | 2 ms | 256 KB |