oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

gpa Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

gpa.html

Kah Khang wants to find out whether he met his targetted Grade Point of 3.9 for his End-of-Year Examination. Will you help him?

(For those who are unsure of the computation, here are the details below)

80 and above: 4.0
70 to 79: 3.6
65 to 69: 3.2
60 to 64: 2.8
55 to 59: 2.4
50 to 54: 2.0
45 to 49: 1.6
40 to 44: 1.2
Below 40: 0.8

Task

Write a program that takes in 1 integer value, A, and output the computed GPA of the value.

Constraints

0 ≤ A ≤ 100

Input

Your program should read from standard input the following data: The first line contains 1 integer A.

Output

Your program should write to the standard output a single line containing a single 1 demical float.

Sample Input 1

75

Sample Output 1

3.6

Tags

Syntax

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
11001011s32MBMinimum
2011s32MBMinimum

Judge Compile Command

g++-8 ans.cpp -o gpa -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.