結果
| 問題 |
No.1824 門\松\列
|
| コンテスト | |
| ユーザー |
koanviolin
|
| 提出日時 | 2022-01-28 21:58:25 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 387 bytes |
| コンパイル時間 | 2,648 ms |
| コンパイル使用メモリ | 73,644 KB |
| 実行使用メモリ | 47,412 KB |
| 最終ジャッジ日時 | 2024-12-30 06:40:48 |
| 合計ジャッジ時間 | 4,205 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 4 |
ソースコード
import java.io.BufferedInputStream;
import java.util.*;
public class Main {
public static void main(String[] argv){
Scanner sc = new Scanner(System.in);
int t= sc.nextInt();
while(t>0) {
t--;
long n = sc.nextLong();
long k = (n-2)*(n-1)*(2*n-3)/3 + (n -2 ) * (n-2);
System.out.println(k);
}
}
}
koanviolin