結果
| 問題 | No.163 cAPSlOCK |
| コンテスト | |
| ユーザー |
kachipan
|
| 提出日時 | 2023-06-23 10:58:41 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 389 bytes |
| コンパイル時間 | 323 ms |
| コンパイル使用メモリ | 28,928 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 16:03:31 |
| 合計ジャッジ時間 | 1,318 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
int main()
{
char str[101] = "";
scanf("%s", &str, sizeof(str));
for (int i = 0;str[i] != '\0';i++)
{
int smallLast = 'z';
int bigLast = 'Z';
if (str[i] <= smallLast && str[i] > bigLast)
{
str[i] -= smallLast - bigLast;
}
else
{
str[i] += smallLast - bigLast;
}
}
printf("%s", str);
return 0;
}
kachipan