結果
| 問題 | No.1108 移調 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-17 16:06:31 |
| 言語 | Rust (1.92.0 + proconio + num) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 413 bytes |
| 記録 | |
| コンパイル時間 | 26,837 ms |
| コンパイル使用メモリ | 415,084 KB |
| 実行使用メモリ | 7,852 KB |
| 最終ジャッジ日時 | 2026-01-17 16:06:59 |
| 合計ジャッジ時間 | 26,885 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
use proconio::{fastout, input};
#[fastout]
fn main() {
input! {
n: usize,
h: i8,
t: [i8; n],
}
println!("{}", output(solve(h, t)))
}
fn solve(h: i8, t: Vec<i8>) -> Vec<i16> {
t.into_iter().map(|t| t as i16 + h as i16).collect()
}
fn output(ans: Vec<i16>) -> String {
ans.into_iter()
.map(|x| x.to_string())
.collect::<Vec<_>>()
.join(" ")
}