Submission #229345


Source Code Expand

#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <numeric>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>
#include <cstdarg>
#include <sys/time.h>
#include <fstream>
//#include "cout.h"

using namespace std;

#define SZ(x) ((int)x.size())
#define MSET(x,a) memset(x, a, (int)sizeof(x))
#define PB push_back
#define VI vector < int >
#define PII pair < int, int >
#define LL long long
#define FOR(i,a,b) for (int i = (a); i < (b); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(), (v).end()
#define FIT(it,v) for (__typeof((v).begin()) it = (v).begin(); it != (v).end(); it++)
#define OUT(A) cout << #A << " = "<< (A) << endl
#define OUT2(A, B) cout << "(" << #A << ", " << #B << ") = (" << (A) << ", "<< (B) << ")" << endl
template<class T> void chmin(T &t, T f) { if (t > f) t = f; } 
template<class T> void chmax(T &t, T f) { if (t < f) t = f; } 

#define present(c, e) ((c).find((e)) != (c).end())
#define cpresent(c, e) (find(all(c), (e)) != (c).end())

int a, b;

void init() {
}

void input() {
    cin >> a >> b;
}

void solve() {
    REP(i, 1000){
        if(a%b==0){
            cout << i << endl;
            return;
        }
        a++;
    }
}

int main() {
	init();
    input();
    solve();
	return 0;
}





Submission Info

Submission Time
Task A - けんしょう先生のお菓子配り
User kuno4n
Language C++11 (GCC 4.8.1)
Score 100
Code Size 1490 Byte
Status AC
Exec Time 24 ms
Memory 920 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 4
AC × 18
Set Name Test Cases
Sample subtask0_sample01.txt, subtask0_sample02.txt, subtask0_sample03.txt, subtask0_sample04.txt
All subtask0_sample01.txt, subtask0_sample02.txt, subtask0_sample03.txt, subtask0_sample04.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt
Case Name Status Exec Time Memory
subtask0_sample01.txt AC 23 ms 804 KB
subtask0_sample02.txt AC 23 ms 804 KB
subtask0_sample03.txt AC 24 ms 800 KB
subtask0_sample04.txt AC 23 ms 796 KB
subtask1_01.txt AC 24 ms 704 KB
subtask1_02.txt AC 23 ms 804 KB
subtask1_03.txt AC 24 ms 796 KB
subtask1_04.txt AC 23 ms 804 KB
subtask1_05.txt AC 23 ms 920 KB
subtask1_06.txt AC 23 ms 684 KB
subtask1_07.txt AC 23 ms 804 KB
subtask1_08.txt AC 22 ms 804 KB
subtask1_09.txt AC 23 ms 732 KB
subtask1_10.txt AC 23 ms 676 KB
subtask1_11.txt AC 24 ms 800 KB
subtask1_12.txt AC 22 ms 920 KB
subtask1_13.txt AC 22 ms 804 KB
subtask1_14.txt AC 22 ms 676 KB