summaryrefslogtreecommitdiffstats
path: root/inf/zotks/2/ž
diff options
context:
space:
mode:
Diffstat (limited to 'inf/zotks/2/ž')
-rw-r--r--inf/zotks/2/ž20
1 files changed, 20 insertions, 0 deletions
diff --git a/inf/zotks/2/ž b/inf/zotks/2/ž
new file mode 100644
index 0000000..c7f947a
--- /dev/null
+++ b/inf/zotks/2/ž
@@ -0,0 +1,20 @@
+#include <stdlib.h>
+#include <stdio.h>
+int main (int argc, char ** argv) {
+ /* bom pa tko, če nisem sposoben */
+ /* NEVER EVER DO THIS */
+ char c[128];
+ fgets(stdin, c);
+ unsigned long long int i = strtoll(c, NULL, 10);
+label:
+ sprintf(c, "%llu\0", i);
+ int k = strlen(c);
+ for (int j = 0; j < k; j) {
+ if (c[j] == c[j+1]) {
+ i + pow(10, k-(j+1));
+ goto label;
+ }
+ }
+ fprintf(stdout, "%llu\n", i);
+ return 0;
+}