13 lines
228 B
C
13 lines
228 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
unsigned int mystere(unsigned int a,unsigned int b) {
|
|
if (b==0)
|
|
return 0;
|
|
else
|
|
return a*(b & 1)+mystere(a<<1,b>>1);
|
|
}
|
|
|
|
int main(void) {
|
|
printf("%d\n", mystere(105, 50));
|
|
} |