結果

問題 No.163 cAPSlOCK
ユーザー sasakki
提出日時 2016-04-14 16:20:13
言語 Java
(openjdk 23)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 448 bytes
コンパイル時間 2,435 ms
コンパイル使用メモリ 81,672 KB
実行使用メモリ 41,000 KB
最終ジャッジ日時 2024-10-04 08:41:58
合計ジャッジ時間 4,512 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;

class Main{
	public static void main(String args[]) throws IOException{
		DataInputStream d = new DataInputStream(System.in);

		String str = d.readLine();
		String ans = "";

		for(int i = 0; i < str.length(); i++){
			if( (int)'a' <= (int) str.charAt(i) && (int) str.charAt(i) <= (int)'z' ){
				ans += (char)(str.charAt(i) - 32);
			}
			else{
				ans += (char)(str.charAt(i) + 32);
			}

		}

		System.out.println(ans);

	}
}
0