Baseline: tree as shared

This commit is contained in:
alexm committed 2026-10-05 03:03:38 +00:00
commit 659c03bbf8
1471 files changed
+990535

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
# origin: Programming+ exercise five-bugs
# status: unverified; `corpus.py verify` checks it on the pinned compiler
# probe: count the G and C bases in t; this version has mistakes to find by stepping
# expect-stdout: 1
def count_gc(t: String) -> Int:
var total: Int = 0
for i in range(t.count_codepoints() - 1):
total = 0
var b: String = String(t[codepoint=i])
if b == "G" or b == "C":
total += 1
return total
def main():
print(count_gc("GATTACA"))