Skip to content

Commit

Permalink
add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
zehengl committed Aug 28, 2024
1 parent 7b661e4 commit 94f77e3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/kakor.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
n = io.read("*n")
ans = 0
for _ = 1, n do
ans = ans + io.read("*n")
end
print(ans)
2 changes: 2 additions & 0 deletions src/kakor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_ = input()
print(sum(int(d) for d in input().split()))
8 changes: 8 additions & 0 deletions src/sangbok.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
t, n = [int(d) for d in input().split()]
s = sorted([int(d) for d in input().split()])
res = 0
for v in s:
if res + v > t * 60:
break
res += v
print(res)

0 comments on commit 94f77e3

Please sign in to comment.