提出 #28419154


ソースコード 拡げる

#[allow(unused_imports)]
use dining_table::*;

#[fastout]
fn main() {
    input! {
        k: u64,
    }
    let mut ans = 0;
    for a in (1..).take_while(|&a| a * a * a <= k) {
        for b in (a..).take_while(|&b| a * b * b <= k) {
            let c = k / (a * b);
            if k == a * b * c {
                ans += 1;
            }
        }
    }
    println!("{}", ans);
}

// template {{{
mod dining_table {
    #![allow(unused_imports)]
    pub use ascii::{AsciiChar, AsciiStr, AsciiString};
    pub use itertools::Itertools;
    pub use itertools_num::ItertoolsNum;
    pub use proconio::marker::Usize1;
    pub use proconio::{fastout, input};
    pub use superslice::Ext;

    #[allow(unused_imports)]
    #[cfg(feature = "dbg")]
    pub use dbg::lg;
    #[cfg(not(feature = "dbg"))]
    #[allow(unused_macros)]
    #[macro_export]
    macro_rules! lg {
        ($($expr:expr),*) => {};
    }
}
// }}}

提出情報

提出日時
問題 085 - Multiplication 085(★4)
ユーザ ngtkana
言語 Rust (1.42.0)
得点 4
コード長 958 Byte
結果 AC
実行時間 1057 ms
メモリ 2200 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 4 / 4
結果
AC × 3
AC × 36
セット名 テストケース
Sample sample_01.txt, sample_02.txt, sample_03.txt
All hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, large_01.txt, large_02.txt, large_03.txt, large_04.txt, large_05.txt, large_06.txt, prime_01.txt, prime_02.txt, prime_03.txt, prime_04.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, sample_01.txt, sample_02.txt, sample_03.txt, small_01.txt, small_02.txt, small_03.txt, small_04.txt
ケース名 結果 実行時間 メモリ
hand_01.txt AC 4 ms 1984 KiB
hand_02.txt AC 1057 ms 2136 KiB
hand_03.txt AC 13 ms 2200 KiB
hand_04.txt AC 1030 ms 2116 KiB
large_01.txt AC 25 ms 1992 KiB
large_02.txt AC 122 ms 2064 KiB
large_03.txt AC 453 ms 2108 KiB
large_04.txt AC 35 ms 2164 KiB
large_05.txt AC 25 ms 2044 KiB
large_06.txt AC 710 ms 1976 KiB
prime_01.txt AC 963 ms 2092 KiB
prime_02.txt AC 870 ms 2052 KiB
prime_03.txt AC 438 ms 2124 KiB
prime_04.txt AC 124 ms 2088 KiB
random_01.txt AC 443 ms 2132 KiB
random_02.txt AC 877 ms 2076 KiB
random_03.txt AC 150 ms 2048 KiB
random_04.txt AC 766 ms 2192 KiB
random_05.txt AC 858 ms 1908 KiB
random_06.txt AC 600 ms 2112 KiB
random_07.txt AC 482 ms 2044 KiB
random_08.txt AC 1037 ms 2020 KiB
random_09.txt AC 298 ms 2052 KiB
random_10.txt AC 471 ms 1964 KiB
random_11.txt AC 841 ms 2052 KiB
random_12.txt AC 592 ms 1984 KiB
random_13.txt AC 795 ms 2160 KiB
random_14.txt AC 753 ms 2064 KiB
random_15.txt AC 931 ms 2160 KiB
sample_01.txt AC 1 ms 1984 KiB
sample_02.txt AC 1 ms 1996 KiB
sample_03.txt AC 2 ms 2032 KiB
small_01.txt AC 1 ms 1932 KiB
small_02.txt AC 1 ms 2136 KiB
small_03.txt AC 1 ms 2064 KiB
small_04.txt AC 1 ms 2060 KiB