Submission #33392574


Source Code Expand

Copy
use proconio::input;
fn main() {
input! {
a: usize,
b: usize,
c: usize,
k: usize,
};
let max = a.max(b).max(c);
let ans = a + b + c - max + max * 2_usize.pow(k as u32);
println!("{}", ans);
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
use proconio::input;

fn main() {
    input! {
        a: usize,
        b: usize,
        c: usize,
        k: usize,
    };
    let max = a.max(b).max(c);
    let ans = a + b + c - max + max * 2_usize.pow(k as u32);
    println!("{}", ans);
}

Submission Info

Submission Time
Task B - Maximum Sum
User bouzuya
Language Rust (1.42.0)
Score 200
Code Size 245 Byte
Status AC
Exec Time 6 ms
Memory 2116 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 6
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All in01.txt, in02.txt, in03.txt, in04.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
in01.txt AC 6 ms 2052 KB
in02.txt AC 1 ms 2116 KB
in03.txt AC 2 ms 2016 KB
in04.txt AC 1 ms 1904 KB
sample_01.txt AC 1 ms 2004 KB
sample_02.txt AC 1 ms 2032 KB


2025-04-08 (Tue)
08:08:24 +00:00