记录详情

Wrong Answer


  
# 状态 耗时 内存占用
#1 Accepted 1ms 2.25 MiB
#2 Wrong Answer 3ms 2.25 MiB
#3 Wrong Answer 3ms 2.332 MiB
#4 Wrong Answer 3ms 2.25 MiB
#5 Wrong Answer 4ms 2.25 MiB
#6 Wrong Answer 976ms 117.875 MiB
#7 Wrong Answer 658ms 82.5 MiB
#8 Wrong Answer 994ms 117.66 MiB
#9 Wrong Answer 934ms 116.332 MiB
#10 Wrong Answer 590ms 72.707 MiB

代码

#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<queue>
#include<string>
#include<map>
#include<cstring>
#include<vector>
#define inf 1e9
#define ll long long
#define For(i,j,k) for(int i=j;i<=k;i++)
#define Dow(i,j,k) for(int i=k;i>=j;i--)
using namespace std;
int mo=1000000007;
int n,tot,pri[10000001],ans;
bool bj[100000001];
void get_pri()
{
	For(i,2,n)
	{
		if(!bj[i])	
			pri[++tot]=i;
		For(j,1,tot)
		{
			if(i*pri[j]>n)	break;
			bj[i*pri[j]]=1;
			if(i%pri[j]==0)	break;
		}
	}
}
int main()
{
	scanf("%d",&n);
	get_pri();
	ans=1;
	For(i,1,tot)
	{
		int num=pri[i];
	//	cout<<num<<endl;
		int t=log(n)/log(num);
		For(i,1,t)	ans=(ans*num)%mo;
	}
	printf("%d\n",ans);
}

信息

递交者
类型
递交
题目
篝题
语言
C++
递交时间
2017-05-02 10:41:03
评测时间
2017-05-02 10:41:03
评测机
分数
10
总耗时
4169ms
峰值内存
117.875 MiB