Submission #2075601
Source Code Expand
#include <stdio.h> #include <stdlib.h> main(){ char s[13]; scanf("%s",s); int i; if('a'<=s[0]&&s[0]<='z'){ s[0]=s[0]-'a'+'A'; } for(i=1;i<strlen(s);i++){ if('A'<=s[i]&&s[i]<='Z'){ s[i]=s[i]-'A'+'a'; } } printf("%s\n",s); }
Submission Info
Submission Time | |
---|---|
Task | B - 名前の確認 |
User | kokubun0293 |
Language | C (GCC 5.4.1) |
Score | 100 |
Code Size | 307 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 128 KB |
Compile Error
./Main.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int] main(){ ^ ./Main.c: In function ‘main’: ./Main.c:10:15: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration] for(i=1;i<strlen(s);i++){ ^ ./Main.c:10:15: warning: incompatible implicit declaration of built-in function ‘strlen’ ./Main.c:10:15: note: include ‘<string.h>’ or provide a declaration of ‘strlen’ ./Main.c:5:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%s",s); ^
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | sample_01.txt, sample_02.txt, test_AzielehadfJD.txt, test_Oq.txt, test_P.txt, test_Wi.txt, test_ZNEFzealEAkD.txt, test_aAZaz.txt, test_z.txt, test_zDkElDjNVmAq.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 1 ms | 128 KB |
sample_02.txt | AC | 1 ms | 128 KB |
test_AzielehadfJD.txt | AC | 1 ms | 128 KB |
test_Oq.txt | AC | 1 ms | 128 KB |
test_P.txt | AC | 1 ms | 128 KB |
test_Wi.txt | AC | 1 ms | 128 KB |
test_ZNEFzealEAkD.txt | AC | 0 ms | 128 KB |
test_aAZaz.txt | AC | 1 ms | 128 KB |
test_z.txt | AC | 1 ms | 128 KB |
test_zDkElDjNVmAq.txt | AC | 1 ms | 128 KB |