Submission #00041


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include<bits/stdc++.h>
#define lol long long
#define mp make_pair
#define fi first
#define se second
#define fixed fixed<<setprecision(14)
using namespace std;
using pii=pair<int,int>;
const lol mod=(1e9)+7;
const int dx[]={1,0,-1,0,1,1,-1,-1};
const int dy[]={0,1,0,-1,1,-1,1,-1};
lol abs(lol x){return(x<0?-x:x);}
signed main(){
cin.tie(0);
ios::sync_with_stdio(false);
lol n,m,k,r;
cin >>n;
lol ans=(n*(n-1))/2;
ans*=4;
cout <<ans+1<<'\n';
return (0);
}

ステータス

項目 データ
問題 0004 - 黴
ユーザー名 ei1923
投稿日時 2020-04-25 21:27:53
言語 C++14
状態 Accepted
得点 300
ソースコード長 498 Byte
最大実行時間 28 ms
最大メモリ使用量 604 KB

セット

セット 得点 Cases
1 ALL 300 / 300 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in01.txt AC 15 ms 604 KB
1
in02.txt AC 21 ms 428 KB
1
in03.txt AC 16 ms 512 KB
1
in04.txt AC 23 ms 588 KB
1
in05.txt AC 19 ms 416 KB
1
in06.txt AC 21 ms 368 KB
1
in07.txt AC 25 ms 580 KB
1
in08.txt AC 16 ms 528 KB
1
in09.txt AC 18 ms 488 KB
1
in10.txt AC 15 ms 572 KB
1
sample01.txt AC 28 ms 528 KB
1
sample02.txt AC 21 ms 604 KB
1
sample03.txt AC 19 ms 564 KB
1