Submission #1080425


Source Code Expand

import Control.Monad
main = do
  n <- read <$> getLine
  abs <- replicateM n $ map read . words <$> getLine
  print $ foldr (\[a,b] x -> x+(b-(a+x)`mod`b)`mod`b) 0 abs

Submission Info

Submission Time
Task A - Multiple Array
User hillpeople
Language Haskell (GHC 7.10.3)
Score 300
Code Size 171 Byte
Status AC
Exec Time 1560 ms
Memory 151932 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 2
AC × 18
Set Name Test Cases
Sample s1.txt, s2.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, s1.txt, s2.txt
Case Name Status Exec Time Memory
01.txt AC 1490 ms 142716 KB
02.txt AC 1463 ms 136700 KB
03.txt AC 1487 ms 142716 KB
04.txt AC 1489 ms 142716 KB
05.txt AC 1483 ms 142716 KB
06.txt AC 1483 ms 142716 KB
07.txt AC 1108 ms 93564 KB
08.txt AC 1512 ms 144764 KB
09.txt AC 1054 ms 75132 KB
10.txt AC 1521 ms 148860 KB
11.txt AC 1095 ms 80252 KB
12.txt AC 711 ms 36860 KB
13.txt AC 1101 ms 80252 KB
14.txt AC 1560 ms 151932 KB
15.txt AC 3 ms 508 KB
16.txt AC 3 ms 508 KB
s1.txt AC 3 ms 508 KB
s2.txt AC 3 ms 508 KB