結果
| 問題 | No.163 cAPSlOCK |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-17 10:05:14 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 58 ms / 5,000 ms |
| + 456µs | |
| コード長 | 611 bytes |
| 記録 | |
| コンパイル時間 | 1,281 ms |
| コンパイル使用メモリ | 83,980 KB |
| 実行使用メモリ | 43,136 KB |
| 最終ジャッジ日時 | 2026-07-26 21:32:06 |
| 合計ジャッジ時間 | 4,050 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
String[] str = s.split("",0);
String[] result = new String[str.length];
for(int i = 0; i < str.length; i++) {
char c = s.charAt(i);
if(Character.isUpperCase(c)) {
result[i] = str[i].toLowerCase();
}else {
result[i] = str[i].toUpperCase();
}
System.out.print(result[i]);
}
}
}