Skip to content

Commit

Permalink
test: Move examples/wip/abc203_b.py to examples/abc203_b.py
Browse files Browse the repository at this point in the history
  • Loading branch information
uta8a committed Aug 7, 2021
1 parent d4357ff commit 50d5613
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 1 deletion.
4 changes: 4 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Please check also the [gallery](https://kmyk.github.io/Jikka/gallery).
- :heavy_check_mark: AC `dp_z-kubaru.py`
- The Kubaru DP version of `dp_z-morau.py`.
- submission at v5.1.0.0: <https://atcoder.jp/contests/dp/submissions/24701829>
- :heavy_check_mark: AC `abc203_b.py`
- AtCoder Beginner Contest 203 [B - AtCoder Condominium](https://atcoder.jp/contests/abc203/tasks/abc203_b)
- AC with a naive solution using `sum(List[int])` / 愚直解が AC `sum(List[int])`を使用
- submission at d2be3858a1ec3b65a8cdb6228e81c85dd976a5bc: <https://atcoder.jp/contests/abc203/submissions/24820582>
- :heavy_check_mark: AC `abc204_b.py`
- AtCoder Beginner Contest 204 [B - Nuts](https://atcoder.jp/contests/abc204/tasks/abc204_b)
- AC with a naive solution / 愚直解が AC
Expand Down
2 changes: 1 addition & 1 deletion examples/wip/abc203_b.py → examples/abc203_b.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://atcoder.jp/contests/abc203/tasks/abc203_b

from typing import *
# from typing import *

def solve(n: int, k: int) -> int:
a = []
Expand Down
15 changes: 15 additions & 0 deletions examples/data/abc203_b.large.generator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env python3
# usage: $ oj generate-input 'python3 generate.py'
# usage: $ oj generate-input --hack-actual=./a.out --hack-expected=./naive 'python3 generate.py'
import random


# generated by oj-template v4.8.1 (https://github.com/online-judge-tools/template-generator)
def main():
N = random.randint(1, 9)
K = random.randint(1, 9)
print(N, K)


if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions examples/data/abc203_b.sample-1.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 2
1 change: 1 addition & 0 deletions examples/data/abc203_b.sample-1.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
203
1 change: 1 addition & 0 deletions examples/data/abc203_b.sample-2.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3 3
1 change: 1 addition & 0 deletions examples/data/abc203_b.sample-2.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1818
29 changes: 29 additions & 0 deletions examples/data/abc203_b.solver.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; (i) < (int)(n); ++(i))
#define REP3(i, m, n) for (int i = (m); (i) < (int)(n); ++(i))
#define REP_R(i, n) for (int i = (int)(n)-1; (i) >= 0; --(i))
#define REP3R(i, m, n) for (int i = (int)(n)-1; (i) >= (int)(m); --(i))
#define ALL(x) ::std::begin(x), ::std::end(x)
using namespace std;

int64_t solve(int64_t N, int64_t K) {
uint64_t ans = 0;
for (int i = 1; i <= N; ++i) {
for (int j = 1; j <= K; ++j) {
ans += 100 * i + j;
}
}
return ans;
}

// generated by oj-template v4.8.1
// (https://github.com/online-judge-tools/template-generator)
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int64_t N, K;
std::cin >> N >> K;
auto ans = solve(N, K);
std::cout << ans << '\n';
return 0;
}

0 comments on commit 50d5613

Please sign in to comment.