結果
問題 |
No.163 cAPSlOCK
|
ユーザー |
|
提出日時 | 2021-01-02 00:00:14 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 431 bytes |
コンパイル時間 | 11,129 ms |
コンパイル使用メモリ | 215,400 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-11 12:18:22 |
合計ジャッジ時間 | 12,276 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
package main import ( "fmt" "strings" "unicode" ) func scan() string { var S string fmt.Scan(&S) return S } func swapcase(S string) string { var res string for _, r := range S { if unicode.IsUpper(r) { res += strings.ToLower(string(rune(r))) } else if unicode.IsLower(r) { res += strings.ToUpper(string(rune(r))) } } return res } func main() { S := scan() // S := "CapsLock" fmt.Println(swapcase(S)) }