結果
| 問題 |
No.163 cAPSlOCK
|
| コンテスト | |
| ユーザー |
fukusei
|
| 提出日時 | 2017-05-27 12:19:54 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 142 ms / 5,000 ms |
| コード長 | 482 bytes |
| コンパイル時間 | 2,171 ms |
| コンパイル使用メモリ | 74,204 KB |
| 実行使用メモリ | 41,808 KB |
| 最終ジャッジ日時 | 2024-09-21 14:31:30 |
| 合計ジャッジ時間 | 6,174 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
import java.util.*;
class test{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String str = sc.next();
String c[] = new String [str.length()];
for(int i=0; i<c.length; i++){
if(str.substring(i, i+1).toUpperCase().equals( str.substring(i, i+1) ) ){
c[i] = str.substring(i, i+1).toLowerCase();
}
else{
c[i] = str.substring(i, i+1).toUpperCase();
}
}
for(int i=0; i<c.length; i++){
System.out.print(c[i]);
}
}
}
fukusei