This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LoopTest { | |
public static void main(String[] argv) { | |
int START = 2000000000; | |
int count = 0; | |
for (float f = START; f < START + 50; f++) { | |
count++; | |
} | |
System.out.println(count); // 0. Proč? | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Seq {aa :: String, gaps :: [(Int, Int)]} | |
fill' :: Int -> Seq -> String | |
fill' n Seq {aa = aa, gaps = gaps} = go (sortOn fst gaps) (zip [1 ..] aa) n | |
where | |
go :: [(Int, Int)] -> [(Int, Char)] -> Int -> String | |
go _ [] l = replicate l '-' | |
go [] str l = map snd str ++ replicate l '-' | |
go gps@((start, leng):gs) ((i, c):xs) l | |
| start <= i = replicateAppend leng '-' (c : go gs xs (l - leng - 1)) | |
| otherwise = c : go gps xs (l - 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program perfetto; | |
var | |
i, n, sum: Integer; | |
sqr, cube: Boolean; | |
begin | |
read(n); | |
sum := 1; |