mirror of
https://github.com/ivabus/pantry
synced 2024-11-24 17:35:08 +03:00
14 lines
229 B
C
14 lines
229 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;
|
||
|
}
|