CARVIEW |
Select Language
HTTP/2 200
date: Mon, 13 Oct 2025 05:40:05 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=ddee34cbc2fd545003be3c215f45ec57e706e33924030e7ce07f0441cce9caaaa%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22YsFW1SM6OjqunFVcbf9iYwR-cqyyx0L9%22%3B%7D; HttpOnly; Path=/
cf-ray: 98dc800a181ac464-BLR
Day 7 - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % The root of the filesystem
- root(root).
- % A directory can have a sub-directory
- sub_directory(root, a).
- sub_directory(root, d).
- sub_directory(a, e).
- % We don't need to know the file name, so we record only the file sizes
- file(root, 14848514).
- file(root, 8504156).
- file(a, 29116).
- file(a, 2557).
- file(a, 62596).
- file(e, 584).
- file(d, 4060174).
- file(d, 8033020).
- file(d, 5626152).
- file(d, 7214296).
- % The root is a directory. An subdirectory of a directory is a directory itself.
- directory(X) :- root(X).
- directory(X) :- sub_directory(Y, X), directory(Y).
- % The size of a directory is the size of all files in the directory plus the sizes of all subdirectories
- directory_size(Dir, Size) :- findall(FileSize, file(Dir, FileSize), SizeList), sum_list(SizeList, DirectFiles), findall(SubDirSize, (sub_directory(Dir, SubDir), directory_size(SubDir, SubDirSize)), SubDirSizeList), sum_list(SubDirSizeList, SubDirs), Size is DirectFiles + SubDirs.
- % Find all directories with a size at most 100000 and sum their sizes
- solve(SizeSum) :- findall(DirSize, (directory(Dir), directory_size(Dir, DirSize), DirSize =< 100000), DirSizeList), sum_list(DirSizeList, SizeSum).
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐⭐⭐Swapzone.io Glitch (Working)⭐⭐
Java | 3 sec ago | 0.15 KB
-
✅ Make $2500 in 20 minutes⭐ 3
JavaScript | 9 sec ago | 0.25 KB
-
💵 Make 3000$ in 20 minutes 💵
JavaScript | 10 sec ago | 0.24 KB
-
📌 Swapzone +37% glitch ⭐ Q
JavaScript | 18 sec ago | 0.25 KB
-
💎 ChangeNOW Exploit
JavaScript | 19 sec ago | 0.24 KB
-
✅⭐ Make huge profits on trading ⭐⭐ B
JavaScript | 27 sec ago | 0.25 KB
-
🚀 Swapzone +37% glitch
JavaScript | 29 sec ago | 0.24 KB
-
✅ Marketplace Glitch ✅ Working NEVER SEEN BE...
JavaScript | 36 sec ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand