AtCoder Beginner Contest 057

Submission #10127260

Source codeソースコード

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1000000007

int d(ll n);

int main(){
    ll t; cin >> t;
    ll sq = sqrtl(t);
    int ma = INT_MIN;
    for(int i = 1; i < sq; i++){
        if(t%i != 0) continue;
        ll s = t/i;
        ma = max(d(s), d(i));
    }
    cout << ma << endl;
    return 0;
}

int d(ll n){
    int c = 0;
    while(n != 0){
        n/=10;
        c++;
    }
    return c;
}

Submission

Task問題 C - Digits in Multiplication
User nameユーザ名 kairi527
Created time投稿日時
Language言語 C++14 (GCC 5.4.1)
Status状態 WA
Score得点 0
Source lengthソースコード長 465 Byte
File nameファイル名
Exec time実行時間 ms
Memory usageメモリ使用量 -

Test case

Set

Set name Score得点 / Max score Cases
Sample - sample_01.txt,sample_02.txt,sample_03.txt
All 0 / 300 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

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
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 WA
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 WA
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 WA
subtask_1_9.txt AC 2 ms 256 KB