Submission #187497


Source Code Expand

#include <iostream>
#include <string>

int main() {
  std::string name;
  std::cin >> name;

  std::string::iterator it = name.begin();

  if (*it >= 'a' && *it <= 'z') {
    *it -= 32;
  }

  ++it;

  for (; it != name.end(); ++it) {
    if (*it >= 'A' && *it <= 'Z') {
      *it += 32;
    }
  }

  std::cout << name << std::endl;
}

Submission Info

Submission Time
Task B - 名前の確認
User tosainu
Language C++11 (GCC 4.8.1)
Score 100
Code Size 356 Byte
Status AC
Exec Time 21 ms
Memory 932 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 8
Set Name Test Cases
All 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 20 ms 928 KB
sample_02.txt AC 20 ms 924 KB
test_AzielehadfJD.txt AC 21 ms 920 KB
test_Oq.txt AC 21 ms 804 KB
test_P.txt AC 21 ms 704 KB
test_Wi.txt AC 21 ms 920 KB
test_ZNEFzealEAkD.txt AC 21 ms 932 KB
test_aAZaz.txt AC 21 ms 800 KB
test_z.txt AC 20 ms 924 KB
test_zDkElDjNVmAq.txt AC 21 ms 800 KB