結果

問題 No.2209 Flip and Reverse
ユーザー AsahiAsahi
提出日時 2023-02-10 22:33:16
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 1,145 bytes
コンパイル時間 5,226 ms
コンパイル使用メモリ 77,684 KB
実行使用メモリ 64,304 KB
最終ジャッジ日時 2023-09-21 23:44:21
合計ジャッジ時間 16,266 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
56,100 KB
testcase_01 AC 119 ms
56,112 KB
testcase_02 AC 119 ms
55,772 KB
testcase_03 AC 118 ms
55,692 KB
testcase_04 AC 120 ms
55,524 KB
testcase_05 AC 119 ms
55,916 KB
testcase_06 AC 118 ms
55,760 KB
testcase_07 AC 119 ms
55,784 KB
testcase_08 WA -
testcase_09 AC 118 ms
55,696 KB
testcase_10 AC 124 ms
55,792 KB
testcase_11 WA -
testcase_12 AC 119 ms
55,528 KB
testcase_13 AC 120 ms
55,788 KB
testcase_14 AC 349 ms
63,968 KB
testcase_15 AC 347 ms
63,300 KB
testcase_16 AC 350 ms
63,516 KB
testcase_17 AC 346 ms
63,592 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 348 ms
63,320 KB
testcase_21 AC 349 ms
63,880 KB
testcase_22 AC 343 ms
63,860 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 350 ms
63,568 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 354 ms
63,336 KB
testcase_29 AC 354 ms
63,324 KB
testcase_30 WA -
testcase_31 AC 355 ms
64,196 KB
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main{

    static  PrintWriter output;
    static  Scanner sc;

    static void solve(){
        int n = ni();
        String s = ns();
        String t = ns();
        int ans = 0;
        for(int i=0;i<n;i++) {
            if(s.charAt(i) != t.charAt(n-i-1)) ans++;
        }
        output.print(ans);
    }

    public static void main(String[] args) throws IOException{
        output = new PrintWriter(System.out);
        sc = new Scanner(System.in);
        solve();
        output.flush();
    }
    static int ni(){ return sc.nextInt();}
    static long nl(){ return sc.nextLong();}
    static String ns(){return sc.next();}
    static BigInteger bi(){return sc.nextBigInteger();}
    static BigDecimal bd(){return sc.nextBigDecimal();}
    static Map<Long,Integer> counter(long [] A) {
        HashMap<Long,Integer> count = new HashMap<>();
        for(int i=0;i<A.length;i++) {
            if(!count.containsKey(A[i])) count.put(A[i],1);
            else count.put(A[i],count.get(A[i])+1);
        }
        return count;
    }
}
0