結果
| 問題 |
No.2140 Triangle
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-12-14 18:44:19 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 138 ms / 2,000 ms |
| コード長 | 490 bytes |
| コンパイル時間 | 2,732 ms |
| コンパイル使用メモリ | 73,880 KB |
| 実行使用メモリ | 41,756 KB |
| 最終ジャッジ日時 | 2024-11-08 10:30:48 |
| 合計ジャッジ時間 | 7,789 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 28 |
ソースコード
import java.util.*;
import java.io.*;
class Main{
public static final int INF = Integer.MAX_VALUE;
public static PrintWriter out = new PrintWriter(System.out);
public static Scanner sc = new Scanner(System.in);
public static void main(String[] args) throws IOException {
int A = sc.nextInt();
long ans = 0;
//必要条件 a + b > c || a + c > b
//A == B のとき
ans += (A*2)-1;
out.print(ans);
out.flush();
}
}