結果

問題 No.1643 Not Substring
ユーザー AsahiAsahi
提出日時 2023-02-04 19:46:41
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 1,217 bytes
コンパイル時間 2,233 ms
コンパイル使用メモリ 75,436 KB
実行使用メモリ 57,428 KB
最終ジャッジ日時 2023-09-16 16:17:46
合計ジャッジ時間 7,245 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,364 KB
testcase_01 AC 119 ms
55,436 KB
testcase_02 AC 118 ms
55,212 KB
testcase_03 AC 119 ms
55,280 KB
testcase_04 AC 120 ms
55,280 KB
testcase_05 WA -
testcase_06 AC 122 ms
55,556 KB
testcase_07 AC 119 ms
55,436 KB
testcase_08 AC 120 ms
55,312 KB
testcase_09 AC 118 ms
55,184 KB
testcase_10 AC 118 ms
55,792 KB
testcase_11 AC 120 ms
55,492 KB
testcase_12 AC 120 ms
55,064 KB
testcase_13 AC 122 ms
55,312 KB
testcase_14 AC 120 ms
55,628 KB
testcase_15 AC 120 ms
57,428 KB
testcase_16 AC 121 ms
55,176 KB
testcase_17 AC 121 ms
55,044 KB
testcase_18 AC 122 ms
55,580 KB
testcase_19 AC 122 ms
55,788 KB
testcase_20 AC 120 ms
55,360 KB
testcase_21 AC 121 ms
55,160 KB
testcase_22 AC 120 ms
55,444 KB
testcase_23 AC 119 ms
55,452 KB
testcase_24 AC 121 ms
55,528 KB
testcase_25 WA -
testcase_26 AC 122 ms
55,308 KB
testcase_27 AC 121 ms
55,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;
import java.util.stream.Stream;

public class Main{
    /* 入出力 */
    static BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));
    static StringTokenizer st;
    static PrintWriter output = new PrintWriter(System.out);
    static Scanner sc = new Scanner(System.in);
    /* 定数 */
    static final int [] y4 = {0,1,0,-1};
    static final int [] x4 = {1,0,-1,0};
    static final int  INF1 = Integer.MAX_VALUE;
    static final long INF2 = Long.MAX_VALUE;
    static final long MOD1 = (long)1e9+7;
    static final long MOD2 = 998244353;
    /* Main */
    public static void main(String[] args) throws IOException{
        int [] cnt = new int[26];
        char [] m = new char[26];
        for(char i = 'a'; i <= 'z'; i ++) m[i-'a'] = i;
        String s = sc.next();
        int n = s.length();
        int what = 0;
        char k = 'a';
        for(int i=0;i<n;i++) cnt[s.charAt(i) - 'a']++;
        for(int i=0;i<26;i++) {
            if(cnt[i] > 0) {
                what = i;
                break;
            }
        }
        for(int i=0;i<=cnt[what];i++) output.print(m[what]);
        output.flush();
    }
}
0