Submission #4648907


Source Code Expand

include<iostream>
using namespace std;
int main()
{
    int n,m,ans=0;
    cin>>n>>m;
    if(n%m==0)
    {
        cout<<"0"<<endl;
        return 0;
    }
    else
        while(n%m!=0)
        {
            n++;
            ans++;
        }
    cout<<ans<<endl;
    return 0;
}

Submission Info

Submission Time
Task A - けんしょう先生のお菓子配り
User luogu_bot3
Language C++14 (GCC 5.4.1)
Score 0
Code Size 298 Byte
Status CE

Compile Error

./Main.cpp:1:1: error: ‘include’ does not name a type
 include<iostream>
 ^
./Main.cpp: In function ‘int main()’:
./Main.cpp:6:5: error: ‘cin’ was not declared in this scope
     cin>>n>>m;
     ^
./Main.cpp:9:9: error: ‘cout’ was not declared in this scope
         cout<<"0"<<endl;
         ^
./Main.cpp:9:20: error: ‘endl’ was not declared in this scope
         cout<<"0"<<endl;
                    ^
./Main.cpp:18:5: error: ‘cout’ was not declared in this scope
     cout<<ans<<endl;
     ^
./Main.cpp:18:16: error: ‘endl’ was not declared in this scope
     cout<<ans<<endl;
                ^