Submission #19719429


Source Code Expand

Copy
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#define LL long long

using namespace std;
const int N = 55;

int t;
LL n, m;

LL qp(LL a, LL b)
{
    LL res = 1;
    while (b)
    {
        if (b & 1) res = res * a % (m * m);
        b >>= 1;
        a = a * a % (m * m);
    }
    return res;
}

int main()
{
    scanf("%lld%lld", &n, &m);
    LL res = qp(10, n);
    printf("%lld\n", res / m);
    return 0;
}

Submission Info

Submission Time
Task A - Simple Math 2
User Evernight
Language C++ (Clang 10.0.0)
Score 300
Code Size 474 Byte
Status AC
Exec Time 13 ms
Memory 3164 KB

Compile Error

./Main.cpp:8:11: warning: unused variable 'N' [-Wunused-const-variable]
const int N = 55;
          ^
1 warning generated.

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 23
Set Name Test Cases
Sample example_00, example_01, example_02
All example_00, example_01, example_02, max_random_00, max_random_01, max_random_02, max_random_03, max_random_04, small_m_00, small_m_01, small_m_02, small_m_03, small_m_04, small_m_05, small_m_06, small_m_07, small_m_08, small_m_09, special_00, special_01, special_02, special_03, special_04
Case Name Status Exec Time Memory
example_00 AC 13 ms 3008 KB
example_01 AC 2 ms 3156 KB
example_02 AC 3 ms 3016 KB
max_random_00 AC 2 ms 3068 KB
max_random_01 AC 2 ms 2992 KB
max_random_02 AC 2 ms 3156 KB
max_random_03 AC 3 ms 3016 KB
max_random_04 AC 2 ms 3000 KB
small_m_00 AC 2 ms 3156 KB
small_m_01 AC 2 ms 3156 KB
small_m_02 AC 2 ms 3064 KB
small_m_03 AC 2 ms 3020 KB
small_m_04 AC 2 ms 3124 KB
small_m_05 AC 2 ms 2992 KB
small_m_06 AC 2 ms 2992 KB
small_m_07 AC 2 ms 3000 KB
small_m_08 AC 3 ms 3124 KB
small_m_09 AC 2 ms 2992 KB
special_00 AC 2 ms 3068 KB
special_01 AC 2 ms 3156 KB
special_02 AC 3 ms 3048 KB
special_03 AC 2 ms 3164 KB
special_04 AC 2 ms 3056 KB