From f65e7733a59efe8bfd8cfe33e699c1e750deb274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Tue, 14 May 2024 22:19:27 +0200 Subject: searphp nokia 6020 friendly (button->inputsubmit) --- "\305\241ola/p2/dn/23kol1a.c" | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 "\305\241ola/p2/dn/23kol1a.c" (limited to 'šola/p2/dn/23kol1a.c') diff --git "a/\305\241ola/p2/dn/23kol1a.c" "b/\305\241ola/p2/dn/23kol1a.c" new file mode 100644 index 0000000..bafd30e --- /dev/null +++ "b/\305\241ola/p2/dn/23kol1a.c" @@ -0,0 +1,18 @@ +#include +#include +#define MAX(x,y) ((x)>(y)?(x):(y)) +int vsote (int n, int m) { + int r = 0; + if (!n) + return 1; + for (int a = 1; a <= n; a++) + for (int b = MAX(m, a); a*b <= n; b++) + if (n-a*b >= 0) + r += vsote(n-a*b, m); + return r; +} +int main (void) { + int n, m; + scanf("%d %d\n", &n, &m); + printf("%d\n", vsote(n, m)); +} -- cgit v1.2.3