QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#433282#8788. Page on vdome.comucup-team635#AC ✓0ms2320kbRust1.8kb2024-06-08 10:07:482024-06-08 10:07:48

Judging History

你现在查看的是最新测评结果

  • [2024-06-08 10:07:48]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:2320kb
  • [2024-06-08 10:07:48]
  • 提交

answer

use std::io::Write;
use std::collections::*;

type Map<K, V> = BTreeMap<K, V>;
type Set<T> = BTreeSet<T>;
type Deque<T> = VecDeque<T>;

fn main() {
    input!(n: u32);
    let ans = if n < 10 {
        n + 1
    } else {
        10
    };
    println!("{}", ans);
}

// ---------- begin input macro ----------
// reference: https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
#[macro_export]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

#[macro_export]
macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};
    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

#[macro_export]
macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };
    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };
    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };
    ($iter:expr, bytes) => {
        read_value!($iter, String).bytes().collect::<Vec<u8>>()
    };
    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };
    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}
// ---------- end input macro ----------

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 2024kb

input:

5

output:

6

result:

ok 1 number(s): "6"

Test #2:

score: 0
Accepted
time: 0ms
memory: 2044kb

input:

10

output:

10

result:

ok 1 number(s): "10"

Test #3:

score: 0
Accepted
time: 0ms
memory: 2320kb

input:

9

output:

10

result:

ok 1 number(s): "10"

Test #4:

score: 0
Accepted
time: 0ms
memory: 2084kb

input:

1

output:

2

result:

ok 1 number(s): "2"

Test #5:

score: 0
Accepted
time: 0ms
memory: 2196kb

input:

2

output:

3

result:

ok 1 number(s): "3"

Test #6:

score: 0
Accepted
time: 0ms
memory: 2144kb

input:

4

output:

5

result:

ok 1 number(s): "5"

Test #7:

score: 0
Accepted
time: 0ms
memory: 2052kb

input:

11

output:

10

result:

ok 1 number(s): "10"

Test #8:

score: 0
Accepted
time: 0ms
memory: 2100kb

input:

19

output:

10

result:

ok 1 number(s): "10"

Test #9:

score: 0
Accepted
time: 0ms
memory: 2128kb

input:

20

output:

10

result:

ok 1 number(s): "10"

Test #10:

score: 0
Accepted
time: 0ms
memory: 2224kb

input:

99

output:

10

result:

ok 1 number(s): "10"

Test #11:

score: 0
Accepted
time: 0ms
memory: 2080kb

input:

100

output:

10

result:

ok 1 number(s): "10"

Test #12:

score: 0
Accepted
time: 0ms
memory: 2196kb

input:

101

output:

10

result:

ok 1 number(s): "10"

Test #13:

score: 0
Accepted
time: 0ms
memory: 1996kb

input:

110

output:

10

result:

ok 1 number(s): "10"

Test #14:

score: 0
Accepted
time: 0ms
memory: 2092kb

input:

12345

output:

10

result:

ok 1 number(s): "10"

Test #15:

score: 0
Accepted
time: 0ms
memory: 2208kb

input:

123456789

output:

10

result:

ok 1 number(s): "10"

Test #16:

score: 0
Accepted
time: 0ms
memory: 2260kb

input:

584392706

output:

10

result:

ok 1 number(s): "10"

Test #17:

score: 0
Accepted
time: 0ms
memory: 2136kb

input:

987654321

output:

10

result:

ok 1 number(s): "10"

Test #18:

score: 0
Accepted
time: 0ms
memory: 2200kb

input:

1000000000

output:

10

result:

ok 1 number(s): "10"

Extra Test:

score: 0
Extra Test Passed