結果
問題 | No.2414 2 KA 3 KA |
ユーザー | ynppp |
提出日時 | 2023-09-04 09:42:39 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 606 bytes |
コンパイル時間 | 15,083 ms |
コンパイル使用メモリ | 388,940 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-22 08:48:48 |
合計ジャッジ時間 | 13,759 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 28 |
ソースコード
#![allow(dead_code, unused_variables)] use std::io::{stdin, BufRead}; fn solve(a: i32, b: i32, c: i32) -> i32 { let y = a * b * c; let x = (a * b + b * c + c * a) * 2; if x > y { 2 } else { 3 } } fn main() { let v = veci32_from_line(); println!("{}", solve(v[0], v[1], v[2],)); } fn get_line() -> String { let mut buf = String::new(); stdin().lock().read_line(&mut buf).unwrap(); buf.trim_end().to_string() } fn veci32_from_line() -> Vec<i32> { get_line() .split_whitespace() .map(|s| s.parse().unwrap()) .collect() }