Submission #23044635
Source Code Expand
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
struct Edge {
int to;
long long w;
Edge(int to, long long w) : to(to), w(w) {}
};
//using Graph = vector<vector<int> >;
//using Graph = vector<vector<Edge> >;
template<class T> void chmax(T& a, T b) {
if(a < b) a = b;
}
template<class T> void chmin(T& a, T b) {
if(a > b) a = b;
}
struct UnionFind {
vector<long long> par, siz;
UnionFind(long long n) : par(n, -1), siz(n, 1){}
long long root(long long x) {
if(par[x] == -1) return x;
else return par[x] = root(par[x]);
}
bool issame(long long x, long long y) {
return root(x) == root(y);
}
bool unite(long long x, long long y) {
x = root(x); y = root(y);
if(x == y) return false;
if(siz[x] < siz[y]) swap(x, y);
par[y] = x;
siz[x] += siz[y];
return true;
}
long long size(long long x) {
return siz[root(x)];
}
};
int main() {
int N, K;
cin >> N >> K;
int ans = 0;
for(int i=100;i<=N*100;i+=100) {
for(int j=1;j<=K;j++) {
ans += i + j;
}
}
cout << ans << endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - AtCoder Condominium |
| User | Tommy3 |
| Language | C++ (GCC 9.2.1) |
| Score | 200 |
| Code Size | 1309 Byte |
| Status | AC |
| Exec Time | 7 ms |
| Memory | 3540 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example_00.txt, example_01.txt |
| All | example_00.txt, example_01.txt, test_00.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| example_00.txt | AC | 7 ms | 3488 KiB |
| example_01.txt | AC | 2 ms | 3492 KiB |
| test_00.txt | AC | 2 ms | 3368 KiB |
| test_01.txt | AC | 2 ms | 3528 KiB |
| test_02.txt | AC | 3 ms | 3408 KiB |
| test_03.txt | AC | 2 ms | 3524 KiB |
| test_04.txt | AC | 2 ms | 3492 KiB |
| test_05.txt | AC | 2 ms | 3344 KiB |
| test_06.txt | AC | 2 ms | 3404 KiB |
| test_07.txt | AC | 2 ms | 3540 KiB |