-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCREDS.java
More file actions
30 lines (25 loc) · 867 Bytes
/
CREDS.java
File metadata and controls
30 lines (25 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* In the current semester, you have taken XXX RTP courses, YYY Audit courses and ZZZ Non-RTP courses.
The credit distribution for the courses are:
444 credits for clearing each RTP course.
222 credits for clearing each Audit course.
No credits for clearing a Non-RTP course.
Assuming that you cleared all your courses, report the number of credits you obtain this semester. */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0){
int x=sc.nextInt();
int y=sc.nextInt();
int z=sc.nextInt();
System.out.println((4*x)+(2*y)+(0*z));
}
// your code goes here
}
}