#pragma comment(linker, "/NODEFAULTLIB:libc.lib")
#pragma warning( disable : 4996)
#include<time.h>
#include<stdio.h>
#include<stdlib.h>
extern "C"
{
#include"miracl.h"
#include"mirdef.h"
}
void main()
{
int i;
big x, e, m, y;
FILE *fp;
clock_t tBegin, tEnd;
miracl *mip = mirsys(1000, 16);
x = mirvar(0);
e = mirvar(0);
m = mirvar(0);
y = mirvar(0);
fp = fopen("data.txt","r+");
mip->IOBASE = 16;
cinnum(x, fp);
cinnum(e, fp);
cinnum(m, fp);
fclose(fp);
tBegin = clock();
for (i = 0; i<100; i++)
powmod(x, e, m, y);
tEnd = clock();
cotnum(x, stdout);
cotnum(e, stdout);
cotnum(m, stdout);
cotnum(y, stdout);
printf("\n\n進行100次1024位元的模指數運算所耗時間為%ld ms\n\n", tEnd - tBegin);
}
已成功編譯,但不讓運行
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/90191.html
標籤:基礎類
上一篇:c++builder中模板類的友元模板函式偏特化應該怎么寫?
下一篇:關于友元的問題
