Submission #21262749


Source Code Expand

/**
 *   @FileName	a.cpp
 *   @Author	kanpurin
 *   @Created	2021.03.26 17:36:28
**/

#include "bits/stdc++.h" 
using namespace std; 
typedef long long ll;

int main() {
    ll n;cin >> n;
    ll ans=0, out=1e6;
    while(out-ans>1) {
        ll mid = (ans+out)/2;
        if (stoll(to_string(mid)+to_string(mid))<=n) ans = mid;
        else out = mid;
    }
    cout << ans << endl;
    return 0;
}

Submission Info

Submission Time
Task C - Doubled
User kanpurin
Language C++ (GCC 9.2.1)
Score 300
Code Size 419 Byte
Status AC
Exec Time 9 ms
Memory 3704 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 34
Set Name Test Cases
Sample 01_sample.txt, 02_sample.txt, 03_sample.txt
All 01_sample.txt, 02_sample.txt, 03_sample.txt, 04_hand.txt, 05_hand.txt, 06_hand.txt, 07_hand.txt, 08_hand.txt, 09_hand.txt, 10_random.txt, 11_random.txt, 12_random.txt, 13_random.txt, 14_random.txt, 15_random.txt, 16_random.txt, 17_random.txt, 18_random.txt, 19_random.txt, 20_random.txt, 21_random.txt, 22_random.txt, 23_random.txt, 24_random.txt, 25_random.txt, 26_random.txt, 27_random.txt, 28_random.txt, 29_random.txt, 30_double.txt, 31_double.txt, 32_double.txt, 33_double.txt, 34_double.txt
Case Name Status Exec Time Memory
01_sample.txt AC 8 ms 3612 KiB
02_sample.txt AC 2 ms 3648 KiB
03_sample.txt AC 4 ms 3644 KiB
04_hand.txt AC 2 ms 3672 KiB
05_hand.txt AC 3 ms 3596 KiB
06_hand.txt AC 2 ms 3668 KiB
07_hand.txt AC 3 ms 3628 KiB
08_hand.txt AC 2 ms 3704 KiB
09_hand.txt AC 2 ms 3672 KiB
10_random.txt AC 2 ms 3688 KiB
11_random.txt AC 2 ms 3624 KiB
12_random.txt AC 2 ms 3672 KiB
13_random.txt AC 2 ms 3632 KiB
14_random.txt AC 2 ms 3620 KiB
15_random.txt AC 2 ms 3668 KiB
16_random.txt AC 2 ms 3700 KiB
17_random.txt AC 3 ms 3672 KiB
18_random.txt AC 2 ms 3572 KiB
19_random.txt AC 2 ms 3672 KiB
20_random.txt AC 2 ms 3688 KiB
21_random.txt AC 2 ms 3612 KiB
22_random.txt AC 2 ms 3672 KiB
23_random.txt AC 2 ms 3672 KiB
24_random.txt AC 2 ms 3572 KiB
25_random.txt AC 3 ms 3616 KiB
26_random.txt AC 2 ms 3620 KiB
27_random.txt AC 2 ms 3684 KiB
28_random.txt AC 2 ms 3668 KiB
29_random.txt AC 3 ms 3560 KiB
30_double.txt AC 3 ms 3700 KiB
31_double.txt AC 2 ms 3700 KiB
32_double.txt AC 2 ms 3564 KiB
33_double.txt AC 9 ms 3564 KiB
34_double.txt AC 2 ms 3664 KiB