Submission #19228


Source Code Expand

Copy
import Data.Char

main :: IO ()
main = do
	_ <- getLine
	s <- getLine
	print (solve (string2int s))

char2int 'A' = 4
char2int 'B' = 3
char2int 'C' = 2
char2int 'D' = 1
char2int 'F' = 0

string2int xs = map char2int xs

-- char2int xs = map digitToInt xs

solve xs = (fromIntegral (sum xs)) / (fromIntegral (length xs))

Submission Info

Submission Time
Task A - GPA計算
User ma2ge
Language Haskell (GHC 7.4.1)
Score 100
Code Size 339 Byte
Status AC
Exec Time 487 ms
Memory 1552 KB

Judge Result

Set Name all
Score / Max Score 100 / 100
Status
AC × 32
Set Name Test Cases
all 00_sample_01.txt, 00_sample_02.txt, 01_rnd_01.txt, 01_rnd_02.txt, 01_rnd_03.txt, 01_rnd_04.txt, 01_rnd_05.txt, 01_rnd_06.txt, 01_rnd_07.txt, 01_rnd_08.txt, 01_rnd_09.txt, 01_rnd_10.txt, 02_rndmax_01.txt, 02_rndmax_02.txt, 02_rndmax_03.txt, 02_rndmax_04.txt, 02_rndmax_05.txt, 02_rndmax_06.txt, 02_rndmax_07.txt, 02_rndmax_08.txt, 02_rndmax_09.txt, 02_rndmax_10.txt, 03_mini_01.txt, 03_mini_02.txt, 03_mini_03.txt, 03_mini_04.txt, 03_mini_05.txt, 04_samemax_01.txt, 04_samemax_02.txt, 04_samemax_03.txt, 04_samemax_04.txt, 04_samemax_05.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 67 ms 1472 KB
00_sample_02.txt AC 28 ms 1336 KB
01_rnd_01.txt AC 29 ms 1396 KB
01_rnd_02.txt AC 27 ms 1468 KB
01_rnd_03.txt AC 29 ms 1460 KB
01_rnd_04.txt AC 28 ms 1464 KB
01_rnd_05.txt AC 29 ms 1500 KB
01_rnd_06.txt AC 26 ms 1548 KB
01_rnd_07.txt AC 28 ms 1468 KB
01_rnd_08.txt AC 28 ms 1464 KB
01_rnd_09.txt AC 28 ms 1452 KB
01_rnd_10.txt AC 28 ms 1464 KB
02_rndmax_01.txt AC 26 ms 1472 KB
02_rndmax_02.txt AC 28 ms 1468 KB
02_rndmax_03.txt AC 228 ms 1460 KB
02_rndmax_04.txt AC 29 ms 1468 KB
02_rndmax_05.txt AC 27 ms 1464 KB
02_rndmax_06.txt AC 28 ms 1464 KB
02_rndmax_07.txt AC 26 ms 1520 KB
02_rndmax_08.txt AC 29 ms 1496 KB
02_rndmax_09.txt AC 27 ms 1468 KB
02_rndmax_10.txt AC 26 ms 1464 KB
03_mini_01.txt AC 29 ms 1496 KB
03_mini_02.txt AC 28 ms 1460 KB
03_mini_03.txt AC 28 ms 1468 KB
03_mini_04.txt AC 487 ms 1464 KB
03_mini_05.txt AC 29 ms 1452 KB
04_samemax_01.txt AC 28 ms 1552 KB
04_samemax_02.txt AC 28 ms 1468 KB
04_samemax_03.txt AC 28 ms 1464 KB
04_samemax_04.txt AC 28 ms 1468 KB
04_samemax_05.txt AC 27 ms 1424 KB