結果

問題 No.163 cAPSlOCK
ユーザー inotakuya
提出日時 2015-03-22 18:49:39
言語 Java
(openjdk 23)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 464 bytes
コンパイル時間 2,581 ms
コンパイル使用メモリ 89,924 KB
実行使用メモリ 54,504 KB
最終ジャッジ日時 2024-06-29 00:05:05
合計ジャッジ時間 6,221 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.IOException;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws IOException {

		new Main().run();
	}

	private void run() throws IOException {
		Scanner scanner = new Scanner(System.in);
		String str = scanner.next();
		str.chars()
				.mapToObj(i -> (char) i)
				.map(s -> s >= 'a' ? Character.toUpperCase(s) : Character
						.toLowerCase(s)).forEach(System.out::print);
		System.out.println();

	}
}
0