Skip to content

Commit 1c2c925

Browse files
committed
Add a test for ATC002-B
1 parent 794585a commit 1c2c925

File tree

6 files changed

+37
-0
lines changed

6 files changed

+37
-0
lines changed

examples/atc002-b.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// https://atcoder.jp/contests/atc002/tasks/atc002_b
2+
3+
use num::BigUint;
4+
5+
#[proconio::fastout]
6+
fn main() {
7+
// use defmac::defmac;
8+
//
9+
// use std::io::{self, Read as _};
10+
//
11+
// let mut input = "".to_owned();
12+
// io::stdin().read_to_string(&mut input).unwrap();
13+
// let mut input = input.split_whitespace();
14+
// defmac!(read => input.next().unwrap().parse().unwrap());
15+
//
16+
// let n: BigUint = read!();
17+
// let m: BigUint = read!();
18+
// let p: BigUint = read!();
19+
20+
use proconio::input;
21+
22+
input! {
23+
n: BigUint,
24+
m: BigUint,
25+
p: BigUint,
26+
}
27+
28+
println!("{}", n.modpow(&p, &m));
29+
}

examples/tests.ron

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
name: "ATC001: B - Union Find",
1313
matching: ExactWords,
1414
),
15+
"atc002-b": (
16+
name: "ATC002: B - n^p mod m",
17+
matching: ExactWords,
18+
),
1519
"arc065-c": (
1620
name: "ABC049 / ARC065: C - 白昼夢 / Daydream",
1721
matching: ExactWords,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12 15 7
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
123456789 234567894 6574837563712
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
120678297

0 commit comments

Comments
 (0)