結果
| 問題 |
No.268 ラッピング(Easy)
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2022-09-01 01:12:13 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 969 bytes |
| コンパイル時間 | 25,958 ms |
| コンパイル使用メモリ | 378,328 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-08 19:34:49 |
| 合計ジャッジ時間 | 25,296 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
コンパイルメッセージ
warning: variable `L1` should have a snake case name
--> src/main.rs:2:10
|
2 | let (L1, L2, L3): (usize, usize, usize) = {
| ^^ help: convert the identifier to snake case: `l1`
|
= note: `#[warn(non_snake_case)]` on by default
warning: variable `L2` should have a snake case name
--> src/main.rs:2:14
|
2 | let (L1, L2, L3): (usize, usize, usize) = {
| ^^ help: convert the identifier to snake case: `l2`
warning: variable `L3` should have a snake case name
--> src/main.rs:2:18
|
2 | let (L1, L2, L3): (usize, usize, usize) = {
| ^^ help: convert the identifier to snake case: `l3`
warning: variable `R` should have a snake case name
--> src/main.rs:14:10
|
14 | let (R, B, Y): (usize, usize, usize) = {
| ^ help: convert the identifier to snake case: `r`
warning: variable `B` should have a snake case name
--> src/main.rs:14:13
|
14 | let (R, B, Y): (usize, usize, usize) = {
| ^ help: convert the identifier to snake case: `b`
warning: variable `Y` should have a snake case name
--> src/main.rs:14:16
|
14 | let (R, B, Y): (usize, usize, usize) = {
| ^ help: convert the identifier to snake case (notice the capitalization): `y`
warning: variable `A` should have a snake case name
--> src/main.rs:26:13
|
26 | let mut A=vec![L1+L2,L1+L3,L2+L3];
| ^ help: convert the identifier to snake case: `a`
warning: variable `B` should have a snake case name
--> src/main.rs:27:13
|
27 | let mut B=vec![R,B,Y];
| ^ help: convert the identifier to snake case: `b`
ソースコード
fn main() {
let (L1, L2, L3): (usize, usize, usize) = {
let mut line: String = String::new();
std::io::stdin().read_line(&mut line).unwrap();
let mut iter = line.split_whitespace();
(
iter.next().unwrap().parse().unwrap(),
iter.next().unwrap().parse().unwrap(),
iter.next().unwrap().parse().unwrap(),
)
};
let (R, B, Y): (usize, usize, usize) = {
let mut line: String = String::new();
std::io::stdin().read_line(&mut line).unwrap();
let mut iter = line.split_whitespace();
(
iter.next().unwrap().parse().unwrap(),
iter.next().unwrap().parse().unwrap(),
iter.next().unwrap().parse().unwrap(),
)
};
let mut A=vec![L1+L2,L1+L3,L2+L3];
let mut B=vec![R,B,Y];
A.sort();
B.sort();
let mut ans=0;
for i in 0..3{
ans+=A[i]*B[2-i]*2;
}
println!("{}",ans);
}
titia