Submission #23039783
Source Code Expand
/**
* Author: kumasento
* Date: 2021-05-30T13:01:58
*/
#include <bits/stdc++.h>
using namespace std;
/// --------------------- Types:
using LL = long long;
using PII = pair<int, int>;
using PIL = pair<int, LL>;
using PLI = pair<LL, int>;
using PLL = pair<LL, LL>;
/// --------------------- Constants:
constexpr int INF = 1e9;
constexpr LL LINF = 1e16;
constexpr LL MOD = 1e9 + 7;
/// --------------------- Helpers:
// *** Credit to Neal Wu
// overload operator<<() for pairs.
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) { return os << '(' << p.first << ", " << p.second << ')'; }
// overload container output. Won't affect strings.
template <typename C, typename T = typename enable_if<!is_same<C, string>::value, typename C::value_type>::type>
ostream &operator<<(ostream &os, const C &v) { os << '{'; string sep; for (const T &x : v) os << sep << x, sep = ", "; return os << '}'; }
// variadic debugger.
void dbg_out() { cerr << endl; }
template <typename Head, typename... Tail> void dbg_out(Head H, Tail... T) { cerr << ' ' << H; dbg_out(T...); }
#ifdef LOCAL_DEBUG
#define dbg(...) cerr << "(" << #__VA_ARGS__ << "):", dbg_out(__VA_ARGS__)
#else
#define dbg(...)
#endif
/// --------------------- Globals:
/// --------------------- Solution:
int main() {
ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#ifdef LOCAL_DEBUG
ifstream in("B.in"); if (in) cin.rdbuf(in.rdbuf());
#endif
int N, K; cin >> N >> K;
int sum = 0;
for (int i = 1; i <= N; i ++) {
for (int j = 1; j <= K; j ++) {
sum += i * 100 + j;
}
}
cout << sum << endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - AtCoder Condominium |
| User | kumasento |
| Language | C++ (GCC 9.2.1) |
| Score | 200 |
| Code Size | 1710 Byte |
| Status | AC |
| Exec Time | 8 ms |
| Memory | 3608 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 | 8 ms | 3544 KiB |
| example_01.txt | AC | 3 ms | 3604 KiB |
| test_00.txt | AC | 2 ms | 3608 KiB |
| test_01.txt | AC | 2 ms | 3480 KiB |
| test_02.txt | AC | 2 ms | 3572 KiB |
| test_03.txt | AC | 6 ms | 3524 KiB |
| test_04.txt | AC | 2 ms | 3532 KiB |
| test_05.txt | AC | 2 ms | 3544 KiB |
| test_06.txt | AC | 2 ms | 3584 KiB |
| test_07.txt | AC | 2 ms | 3588 KiB |