diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2023-04-06 22:22:40 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2023-04-06 22:22:40 +0200 |
commit | c5fd0c67e79d56c5f09ff8587101917a0c45120c (patch) | |
tree | 438484adefdebb158baf3bb8756a27dffedc7d4a /inf/zotksd/3.c | |
parent | mat zadnji test, upam (diff) | |
parent | z: zotksd, fizvaje10, infsemin (diff) | |
download | sola-gimb-4-c5fd0c67e79d56c5f09ff8587101917a0c45120c.tar sola-gimb-4-c5fd0c67e79d56c5f09ff8587101917a0c45120c.tar.gz sola-gimb-4-c5fd0c67e79d56c5f09ff8587101917a0c45120c.tar.bz2 sola-gimb-4-c5fd0c67e79d56c5f09ff8587101917a0c45120c.tar.lz sola-gimb-4-c5fd0c67e79d56c5f09ff8587101917a0c45120c.tar.xz sola-gimb-4-c5fd0c67e79d56c5f09ff8587101917a0c45120c.tar.zst sola-gimb-4-c5fd0c67e79d56c5f09ff8587101917a0c45120c.zip |
Diffstat (limited to 'inf/zotksd/3.c')
-rw-r--r-- | inf/zotksd/3.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/inf/zotksd/3.c b/inf/zotksd/3.c new file mode 100644 index 0000000..b7723b1 --- /dev/null +++ b/inf/zotksd/3.c @@ -0,0 +1,22 @@ +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#define ABS(x) ((x) > 0 ? (x) : -(x)) +#define N unsigned long long int +int main (void) { + char buf[512]; + fgets(buf, 512, stdin); + N n = strtoull(buf, NULL, 10); + N num = 0; + for (N i = 1; i < ceill(sqrtl(n)); i++) { + if (n % i) + continue; + if (ABS(i-n/i) % 2) + continue; + num++; +#ifndef EVAL + fprintf(stderr, "(%llu, %llu)\n", i, n/i); +#endif + } + printf("%llu\n", num); +} |