結果

問題 No.2140 Triangle
ユーザー tentententen
提出日時 2022-12-16 15:24:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 50 ms / 2,000 ms
コード長 971 bytes
コンパイル時間 1,793 ms
コンパイル使用メモリ 74,604 KB
実行使用メモリ 37,396 KB
最終ジャッジ日時 2024-04-27 16:46:29
合計ジャッジ時間 4,136 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
37,124 KB
testcase_01 AC 47 ms
37,152 KB
testcase_02 AC 46 ms
36,940 KB
testcase_03 AC 45 ms
37,056 KB
testcase_04 AC 45 ms
36,996 KB
testcase_05 AC 45 ms
37,180 KB
testcase_06 AC 45 ms
37,152 KB
testcase_07 AC 44 ms
37,268 KB
testcase_08 AC 45 ms
37,132 KB
testcase_09 AC 46 ms
36,908 KB
testcase_10 AC 45 ms
36,780 KB
testcase_11 AC 46 ms
37,068 KB
testcase_12 AC 46 ms
37,024 KB
testcase_13 AC 45 ms
37,160 KB
testcase_14 AC 45 ms
36,940 KB
testcase_15 AC 46 ms
37,024 KB
testcase_16 AC 48 ms
36,988 KB
testcase_17 AC 50 ms
36,772 KB
testcase_18 AC 46 ms
37,068 KB
testcase_19 AC 46 ms
37,132 KB
testcase_20 AC 45 ms
37,080 KB
testcase_21 AC 44 ms
37,068 KB
testcase_22 AC 43 ms
37,060 KB
testcase_23 AC 44 ms
36,940 KB
testcase_24 AC 44 ms
36,652 KB
testcase_25 AC 44 ms
36,644 KB
testcase_26 AC 44 ms
37,048 KB
testcase_27 AC 46 ms
37,112 KB
testcase_28 AC 46 ms
36,968 KB
testcase_29 AC 46 ms
37,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner();
        int n = sc.nextInt();
        System.out.println(n * 2 - 1);
    }
}
class Scanner {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer("");
    StringBuilder sb = new StringBuilder();
    
    public Scanner() throws Exception {
        
    }
    
    public int nextInt() throws Exception {
        return Integer.parseInt(next());
    }
    
    public long nextLong() throws Exception {
        return Long.parseLong(next());
    }
    
    public double nextDouble() throws Exception {
        return Double.parseDouble(next());
    }
    
    public String next() throws Exception {
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }
    
}
0