Submission #16581626


Source Code Expand

Copy
use proconio::input;

fn main() {
    input! {
        n: usize,
    };
    let mut all = 0;
    for a in 1..=9 {
        for b in 1..=9 {
            all += a * b;
        }
    }
    let x = all - n;
    for a in 1..=9 {
        for b in 1..=9 {
            if a * b == x {
                println!("{} x {}", a, b);
            }
        }
    }
}

Submission Info

Submission Time
Task C - 九九足し算
User bouzuya
Language Rust (1.42.0)
Score 100
Code Size 351 Byte
Status AC
Exec Time 3 ms
Memory 2184 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 20
Set Name Test Cases
All sample_01.txt, sample_02.txt, test_1953.txt, test_1971.txt, test_1977.txt, test_1983.txt, test_1989.txt, test_1990.txt, test_1993.txt, test_1995.txt, test_1997.txt, test_1998.txt, test_2001.txt, test_2009.txt, test_2013.txt, test_2017.txt, test_2019.txt, test_2020.txt, test_2022.txt, test_2024.txt
Case Name Status Exec Time Memory
sample_01.txt AC 3 ms 1976 KB
sample_02.txt AC 2 ms 1976 KB
test_1953.txt AC 1 ms 1956 KB
test_1971.txt AC 1 ms 2052 KB
test_1977.txt AC 2 ms 2000 KB
test_1983.txt AC 1 ms 2184 KB
test_1989.txt AC 2 ms 2100 KB
test_1990.txt AC 1 ms 2044 KB
test_1993.txt AC 2 ms 2140 KB
test_1995.txt AC 2 ms 2112 KB
test_1997.txt AC 2 ms 2172 KB
test_1998.txt AC 1 ms 2052 KB
test_2001.txt AC 2 ms 1908 KB
test_2009.txt AC 1 ms 1904 KB
test_2013.txt AC 1 ms 2064 KB
test_2017.txt AC 1 ms 1996 KB
test_2019.txt AC 1 ms 2004 KB
test_2020.txt AC 2 ms 2032 KB
test_2022.txt AC 1 ms 2112 KB
test_2024.txt AC 1 ms 1980 KB