Submission #19723643


Source Code Expand

Copy
#include<iostream>
#include<algorithm>
#define ll long long
#define INF 0x7f7f7f7f //2139062143
#define llINF 9223372036854775807
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;

ll qpow(ll x,ll p,ll mod)
{
    ll ret=1;
    while(p)
    {
        if(p&1) ret=ret*x%mod;
        x=x*x%mod;
        p>>=1;
    }
    return ret;
}

int main()
{
    IOS
    ll n,m;cin>>n>>m;
    n=qpow(10,n,m*m);
    cout<<n/m%m<<endl;
}

Submission Info

Submission Time
Task A - Simple Math 2
User StandNotAlone
Language C++ (Clang 10.0.0)
Score 300
Code Size 482 Byte
Status AC
Exec Time 7 ms
Memory 3192 KB

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 7 ms 3188 KB
example_01 AC 2 ms 3012 KB
example_02 AC 2 ms 3136 KB
max_random_00 AC 3 ms 3028 KB
max_random_01 AC 3 ms 3040 KB
max_random_02 AC 2 ms 3192 KB
max_random_03 AC 2 ms 3156 KB
max_random_04 AC 2 ms 3108 KB
small_m_00 AC 2 ms 3016 KB
small_m_01 AC 2 ms 3164 KB
small_m_02 AC 2 ms 3004 KB
small_m_03 AC 2 ms 3040 KB
small_m_04 AC 2 ms 3148 KB
small_m_05 AC 2 ms 3052 KB
small_m_06 AC 2 ms 3192 KB
small_m_07 AC 2 ms 3140 KB
small_m_08 AC 2 ms 3160 KB
small_m_09 AC 3 ms 3104 KB
special_00 AC 2 ms 3100 KB
special_01 AC 3 ms 3028 KB
special_02 AC 2 ms 3040 KB
special_03 AC 3 ms 3192 KB
special_04 AC 2 ms 3136 KB