写得很丑,勿喷。

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	cin>>n;
	if(n==10)
	{
		cout<<22*pow(3,n-1)/3;
		return 0;
	}
	cout<<22*pow(3,n)/3;
	return 0;
}

0 comments

No comments so far...

Information

ID
2391
Time
ms
Memory
MiB
Difficulty
4
Tags
# Submissions
4
Accepted
1
Uploaded By