結果

問題 No.2314 Backflip
ユーザー sysnote8mainsysnote8main
提出日時 2024-02-03 22:37:52
言語 Java21
(openjdk 21)
結果
AC  
実行時間 156 ms / 2,000 ms
コード長 355 bytes
コンパイル時間 2,284 ms
コンパイル使用メモリ 74,352 KB
実行使用メモリ 57,924 KB
最終ジャッジ日時 2024-02-03 22:37:57
合計ジャッジ時間 4,700 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
57,828 KB
testcase_01 AC 117 ms
57,688 KB
testcase_02 AC 118 ms
57,924 KB
testcase_03 AC 118 ms
57,704 KB
testcase_04 AC 116 ms
57,704 KB
testcase_05 AC 156 ms
55,752 KB
testcase_06 AC 125 ms
57,688 KB
testcase_07 AC 119 ms
57,712 KB
testcase_08 AC 118 ms
57,720 KB
testcase_09 AC 105 ms
56,672 KB
testcase_10 AC 115 ms
57,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
  public static void log(Object obj) {
    System.out.println(obj.toString());
  }

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char[] c = s.toCharArray();
    c[c.length-1] = c[c.length-1] == '0' ? '1': '0';
    log(new String(c));
  }
}
0