Created
July 17, 2016 13:40
-
-
Save Jack-Saleem/3682ede8c2247e0191f9591f90c57f2a to your computer and use it in GitHub Desktop.
codeforces 604A UncowedForces program in java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class UncowedForces | |
{ | |
public static void main(String[] args) | |
{ | |
Scanner z=new Scanner(System.in); | |
int m[]=new int[5]; | |
int w[]=new int[5]; | |
int x=0; | |
for(int i=0;i<5;i++){ | |
m[i]=z.nextInt(); | |
} | |
int s=0; | |
for(int i=0;i<5;i++){ | |
w[i]=z.nextInt(); | |
} | |
for(int i=0;i<5;i++){ | |
x+=Math.max(0.3*500*(i+1), (250-m[i])*((500*(i+1))/250)-(50*w[i])); | |
} | |
s=50*s; | |
int sh=z.nextInt(); | |
int ush=z.nextInt(); | |
System.out.println(x-s+(100*sh)-(50*ush)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment