結果
| 問題 | No.163 cAPSlOCK |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-02-12 00:10:46 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 58 ms / 5,000 ms |
| コード長 | 535 bytes |
| 記録 | |
| コンパイル時間 | 1,610 ms |
| コンパイル使用メモリ | 82,156 KB |
| 実行使用メモリ | 124,556 KB |
| 最終ジャッジ日時 | 2026-04-02 03:22:21 |
| 合計ジャッジ時間 | 4,153 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_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.next().split("");
String result="";
for(int i=0; i<S.length; i++){
if( S[i].matches( "[a-z]+" ) ){
result=S[i].toUpperCase();
System.out.print(result);
}else if(S[i].matches("[A-Z]")){
result=S[i].toLowerCase();
System.out.print(result);
}
}
sc.close();
}
}