結果
| 問題 | No.3555 Use Money Wisely |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2026-05-30 12:57:40 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 620 bytes |
| 記録 | |
| コンパイル時間 | 1,138 ms |
| コンパイル使用メモリ | 190,200 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-30 12:57:48 |
| 合計ジャッジ時間 | 7,970 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
| 純コード判定待ち |
(要ログイン)
| サブタスク | 配点 | 結果 |
|---|---|---|
| 部分点1 | 20 % | AC * 11 |
| 部分点2 | 10 % | AC * 15 |
| 部分点3 | 30 % | AC * 16 |
| 部分点4 | 40 % | AC * 31 |
| 合計 | 100 点 |
ソースコード
#![allow(non_snake_case, unused_imports)]
use proconio::{input, marker::Usize1, marker::Chars};
use itertools::Itertools;
#[allow(unused_macros)]
macro_rules! d {
( $( $x:expr ),* $(,)? ) => {
eprintln!(
concat!( $( stringify!($x), "={:?} " ),* ),
$( $x ),*
);
};
}
#[allow(dead_code)]
fn yn(b: bool) -> &'static str {
if b { "Yes" } else { "No" }
}
fn main() {
input! {
Y: i64,
N: usize,
A: [i64; N],
}
let x = Y - A.iter().sum::<i64>();
if x < 0 {
println!("red");
} else {
println!("{}", x);
}
}
norioc