Submission #3016819
Source Code Expand
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int k = sc.nextInt(); if (a < b) { if (b < c){ System.out.println(a+b+c*2*k); } else { System.out.println(a+b*2*k+c); } } else { if (a < c){ System.out.println(a+b+c*2*k); } else { System.out.println(a*2*k+b+c); } } } }
Submission Info
Submission Time | |
---|---|
Task | B - Maximum Sum |
User | ks96neko |
Language | Java7 (OpenJDK 1.7.0) |
Score | 0 |
Code Size | 647 Byte |
Status | WA |
Exec Time | 103 ms |
Memory | 20948 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||||
Status |
|
|
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 | WA | 103 ms | 20944 KB |
in02.txt | WA | 96 ms | 18772 KB |
in03.txt | WA | 94 ms | 20948 KB |
in04.txt | WA | 95 ms | 18772 KB |
sample_01.txt | AC | 94 ms | 18772 KB |
sample_02.txt | AC | 94 ms | 20820 KB |