refactor various files

This commit is contained in:
2025-04-28 16:59:44 +02:00
parent 5049c3ec13
commit 05c830c8e2
97 changed files with 513 additions and 2676 deletions

24
S1/GdCP/uebung/clean.c Normal file
View File

@@ -0,0 +1,24 @@
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define N 998
int main() {
int b = 0, r = 0, i = 0;
while ((b = getchar()) != '\n') {
if (i % 2 == 0) r -= b - '0';
else r += b - '0';
i++;
}
if(r == -4) r = 4;
if(r == -10) r = 10;
if(r == -1) r = 1;
printf("%d\n", r);
return 0;
}