From 7f3d3fe308ae4cc687dc967e5bfca6123b030557 Mon Sep 17 00:00:00 2001 From: Denis Costa Date: Sun, 29 Sep 2024 21:23:51 -0300 Subject: [PATCH] Solve Optical Reader in c --- solutions/beecrowd/1129/1129.c | 9 ++++++++- solutions/beecrowd/1129/WRONG | 0 2 files changed, 8 insertions(+), 1 deletion(-) delete mode 100644 solutions/beecrowd/1129/WRONG diff --git a/solutions/beecrowd/1129/1129.c b/solutions/beecrowd/1129/1129.c index b2c6a737..56569652 100644 --- a/solutions/beecrowd/1129/1129.c +++ b/solutions/beecrowd/1129/1129.c @@ -19,7 +19,14 @@ int main() { if (c != 1) { puts("*"); } else { - printf("%c\n", l[r]); + // buggy code was printing non readable characters + if (r == 0) { + printf("A\n"); + } else if (r == 1) { + printf("B\n"); + } else { + printf("%c\n", l[r]); + } } } } diff --git a/solutions/beecrowd/1129/WRONG b/solutions/beecrowd/1129/WRONG deleted file mode 100644 index e69de29b..00000000