QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#85320#5356. esperarxiaoyaowudi0 2ms3540kbC++14406b2023-03-07 16:00:282023-03-07 16:01:27

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-07 16:01:27]
  • 评测
  • 测评结果:0
  • 用时:2ms
  • 内存:3540kb
  • [2023-03-07 16:00:28]
  • 提交

answer

#include <iostream>
#include <algorithm>
constexpr int N(110),p(998244353);
int main()
{
	int a(1),b(1);
	int n;std::cin>>n;
	while(n--)
	{
		int t;std::cin>>t;
		for(int i(2);i*i<=t;++i) if((t%i)==0)
		{
			int c(0);
			while((t%i)==0) ++c,t/=i;
			a=1ll*a*(c/2+1)%p;
			b=1ll*b*((c+1)*(c+2)/2)%p;
		}
		if(t>1) b=3ll*b%p;
	}
	std::cout<<1ll*(a+b)*((p+1)/2)%p<<std::endl;
	return 0;
}

詳細信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 17
Accepted
time: 2ms
memory: 3336kb

input:

2
2 3

output:

5

result:

ok single line: '5'

Test #2:

score: -17
Wrong Answer
time: 2ms
memory: 3540kb

input:

4
5 8 8 9

output:

904

result:

wrong answer 1st lines differ - expected: '916', found: '904'

Subtask #2:

score: 0
Wrong Answer

Test #7:

score: 0
Wrong Answer
time: 0ms
memory: 3388kb

input:

100
78125 625 244140625 9765625 390625 9765625 244140625 3125 125 244140625 1 78125 25 48828125 25 3125 15625 9765625 25 125 9765625 1 625 125 244140625 3125 15625 48828125 9765625 1 125 390625 1953125 15625 1 5 9765625 5 48828125 125 9765625 25 5 48828125 390625 25 125 390625 9765625 9765625 625 31...

output:

517412673

result:

wrong answer 1st lines differ - expected: '476416688', found: '517412673'

Subtask #3:

score: 0
Wrong Answer

Test #12:

score: 0
Wrong Answer
time: 2ms
memory: 3416kb

input:

100
78125 625 244140625 9765625 390625 9765625 244140625 3125 125 244140625 1 78125 25 48828125 25 3125 15625 9765625 25 125 9765625 1 625 125 244140625 3125 15625 48828125 9765625 1 125 390625 1953125 15625 1 5 9765625 5 48828125 125 9765625 25 5 48828125 390625 25 125 390625 9765625 9765625 625 31...

output:

517412673

result:

wrong answer 1st lines differ - expected: '476416688', found: '517412673'