結果

問題 No.2049 POP
ユーザー tentententen
提出日時 2022-08-22 11:20:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 52 ms / 2,000 ms
コード長 965 bytes
コンパイル時間 1,996 ms
コンパイル使用メモリ 73,828 KB
実行使用メモリ 37,212 KB
最終ジャッジ日時 2024-04-18 13:20:33
合計ジャッジ時間 3,210 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
37,060 KB
testcase_01 AC 52 ms
36,660 KB
testcase_02 AC 51 ms
37,212 KB
testcase_03 AC 51 ms
37,208 KB
testcase_04 AC 51 ms
37,112 KB
testcase_05 AC 51 ms
36,948 KB
testcase_06 AC 51 ms
37,188 KB
testcase_07 AC 51 ms
37,172 KB
testcase_08 AC 50 ms
37,008 KB
testcase_09 AC 51 ms
36,956 KB
testcase_10 AC 51 ms
37,176 KB
testcase_11 AC 50 ms
36,912 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();
        String s = sc.next();
        System.out.println(s.substring(1, n - 1));
    }
}

class Scanner {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer("");
    
    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