Submission #1073385
Source Code Expand
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstring> #include <cstdio> #include <cmath> #include <cstdlib> #include <ctime> #include <string.h> #include <fstream> #include <cassert> using namespace std; #define boost ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0) #define sz(a) int((a).size()) #define rep(i, s, n) for(int i = s; i <= (n); ++i) #define rev(i, n, s) for(int i = (n); i >= s; --i) #define fore(x, a) for(auto &&x : a) typedef long long ll; const int mod = 1000000007; const int N = 100005; int main() { #ifdef loc if(!freopen((string(FOLDER) + "inp.txt").c_str(), "r", stdin)) { assert(0); } freopen((string(FOLDER) + "out.txt").c_str(), "w", stdout); #endif boost; int n; cin >> n; ll res = 0; rep(i, 1, n) { ll x, y; cin >> x >> y; ll cur = (x%y); if (cur) cur = y - cur; res += cur; } cout << res << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Multiple Array |
User | chintu |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1285 Byte |
Status | WA |
Exec Time | 25 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | s1.txt, s2.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, s1.txt, s2.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | WA | 23 ms | 256 KB |
02.txt | WA | 23 ms | 256 KB |
03.txt | WA | 23 ms | 256 KB |
04.txt | WA | 23 ms | 256 KB |
05.txt | WA | 24 ms | 256 KB |
06.txt | WA | 23 ms | 256 KB |
07.txt | AC | 19 ms | 256 KB |
08.txt | WA | 24 ms | 256 KB |
09.txt | AC | 20 ms | 256 KB |
10.txt | WA | 24 ms | 256 KB |
11.txt | WA | 19 ms | 256 KB |
12.txt | AC | 14 ms | 256 KB |
13.txt | WA | 19 ms | 256 KB |
14.txt | AC | 25 ms | 256 KB |
15.txt | AC | 3 ms | 256 KB |
16.txt | AC | 3 ms | 256 KB |
s1.txt | WA | 3 ms | 256 KB |
s2.txt | WA | 3 ms | 256 KB |