mirror of
https://github.com/ivabus/pantry
synced 2024-11-27 10:45:08 +03:00
13 lines
233 B
C
13 lines
233 B
C
|
#include <gmp.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
int main() {
|
||
|
mpz_t i, j, k;
|
||
|
mpz_init_set_str (i, "1a", 16);
|
||
|
mpz_init (j);
|
||
|
mpz_init (k);
|
||
|
mpz_sqrtrem (j, k, i);
|
||
|
if (mpz_get_si (j) != 5 || mpz_get_si (k) != 1) abort();
|
||
|
return 0;
|
||
|
}
|