Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (32 sloc) 609 Bytes
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cstdlib>
using namespace std;
string readline()
{
string str;
getline(cin, str);
return str;
}
vector<string> split(const string &str, char sep)
{
vector<string> vec;
istringstream sstream(str);
string buf;
while (getline(sstream, buf, sep)) {
vec.push_back(buf);
}
return vec;
}
int main(void)
{
auto arr = split(readline(), ' ');
if ((stoi(arr[1]) % stoi(arr[0])) == 0) {
cout << "ok" << endl;
}else{
cout << "ng" << endl;
}
return 0;
}
You can’t perform that action at this time.