結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー tabataba
提出日時 2024-07-30 16:18:34
言語 Rust
(1.77.0)
結果
AC  
実行時間 867 ms / 2,000 ms
コード長 332 bytes
コンパイル時間 10,919 ms
コンパイル使用メモリ 405,332 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-30 16:18:52
合計ジャッジ時間 15,592 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
6,820 KB
testcase_01 AC 30 ms
6,944 KB
testcase_02 AC 23 ms
6,944 KB
testcase_03 AC 62 ms
6,940 KB
testcase_04 AC 11 ms
6,940 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 1 ms
6,944 KB
testcase_08 AC 3 ms
6,944 KB
testcase_09 AC 40 ms
6,940 KB
testcase_10 AC 867 ms
6,944 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unused imports: `HashMap`, `HashSet`
 --> src/main.rs:1:24
  |
1 | use std::collections::{HashMap, HashSet};
  |                        ^^^^^^^  ^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `proconio::marker::Chars`
 --> src/main.rs:3:5
  |
3 | use proconio::marker::Chars;
  |     ^^^^^^^^^^^^^^^^^^^^^^^

ソースコード

diff #

use std::collections::{HashMap, HashSet};

use proconio::marker::Chars;

fn main() {
    proconio::input! {
        n: u32,
    }
    for a in 1..=n / 3 {
        for b in a..=n / 2 {
            let c = n - (a + b);
            if c < b {
                break;
            }
            println!("{a} {b} {c}");
        }
    }
}
0