Advertisement
ApOszTroF

Haskell GyakZH

Oct 4th, 2022 (edited)
1,821
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module GyakZH where
  2.  
  3. zarojel1 = ((10 `rem` 3) == (3^(2^1))) || (((8 > ((23 `mod` 9) `div` 2)) && False) || True)
  4. zarojel2 = 121 `mod` 9 `div` 5 == (2 ^ 3) ^ 2 - 3 * 22 - 6 && (5 > 2 * 5 ^ 2 || (3 + (7 - 2)) * 3 > 10)
  5.  
  6. locsolas = ceiling ((50 * 0.25) / 1.8)
  7.  
  8. polinom = head [i | i <- [1 ..], 3 * i ^ 5 + 4 * i ^ 3 + 7 * i ^ 2 + 4 > 1000]
  9.  
  10. soros = sum [x | x <- [50 .. 250]]
  11. parhuzamos = recip (sum [recip x | x <- [50 .. 250]])
  12.  
  13. osztoi220 = sum [i | i <- [1 .. 220 `div` 2], 220 `mod` i == 0]
  14. osztoi284 = sum [i | i <- [1 .. 284 `div` 2], 284 `mod` i == 0]
  15. megoldas = sum [i | i <- [1..220 `div` 2], 220 `mod` i == 0] == 284 && sum [i | i <- [1..284 `div` 2], 284 `mod` i == 0] == 220
  16.  
  17. elso50 = [(x, [i | i <- [1 .. x], x `mod` i == 0]) | x <- [1 .. 50]]
  18.  
  19. szamharmasok = [(a, b, 150 - a - b) | b <- [1 .. 149], a <- [1 .. b], a ^ 2 + b ^ 2 == (150 - a - b) ^ 2]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement