Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <math.h>
- #include <stdio.h>
- typedef unsigned long long ull;
- ull power(ull, ull);
- int main(void) {
- ull xi, yi, zi;
- printf("整数を入力してください: ");
- scanf("%lld", &xi);
- yi = 95;
- zi = power(xi, yi);
- printf("%lldの%lld乗は%lldです。それを323で割った余りは%lldです\n", xi, yi, zi, zi % 323);
- printf("十六進数表示は%llxです", zi % 323);
- return 0;
- }
- ull power(ull x, ull y) {
- ull i, result;
- for (i = 1, result = 1; i <= y; i++)
- result *= x;
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement