結果
| 問題 |
No.163 cAPSlOCK
|
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2015-07-20 21:38:57 |
| 言語 | Go (1.23.4) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 367 bytes |
| コンパイル時間 | 10,778 ms |
| コンパイル使用メモリ | 224,360 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-10 19:19:40 |
| 合計ジャッジ時間 | 11,630 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
package main
import (
"fmt"
"unicode"
)
func inverse(s string) string {
cs := []rune(s)
for i := 0; i < len(cs); i++ {
if unicode.IsUpper(cs[i]) {
cs[i] = unicode.ToLower(cs[i])
} else if unicode.IsLower(cs[i]) {
cs[i] = unicode.ToUpper(cs[i])
}
}
return string(cs)
}
func main() {
var s string
fmt.Scanf("%s", &s)
fmt.Println(inverse(s))
}
norioc