結果
問題 | No.163 cAPSlOCK |
ユーザー |
|
提出日時 | 2022-12-15 17:52:32 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 257 bytes |
コンパイル時間 | 212 ms |
コンパイル使用メモリ | 27,392 KB |
最終ジャッジ日時 | 2025-02-09 13:57:35 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:4:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 4 | scanf("%s",buf); | ~~~~~^~~~~~~~~~
ソースコード
#include<stdio.h> int main() { char buf[101] = {}; scanf("%s",buf); for (char *p = buf; *p != 0; p += 1) { if('a'<=*p&&*p<='z'){ *p-=('a'-'A'); }else{ *p+=('a'-'A'); } } printf("%s",buf); }