提出 #76040329


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    int n;
    cin >> n;
    for(int i = 1; i <= n; i ++){
        string c[15];
        cin >> c[i];
        if(c[i].at(0) == 'a' || c[i].at(0) == 'b' || c[i].at(0) == 'c') cout << "2";
        else if(c[i].at(0) == 'd' || c[i].at(0) == 'e' || c[i].at(0) == 'f') cout << "3";
        else if(c[i].at(0) == 'g' || c[i].at(0) == 'h' || c[i].at(0) == 'i') cout << "4";
        else if(c[i].at(0) == 'j' || c[i].at(0) == 'k' || c[i].at(0) == 'l') cout << "5";
        else if(c[i].at(0) == 'm' || c[i].at(0) == 'n' || c[i].at(0) == 'o') cout << "6";
        else if(c[i].at(0) == 'p' || c[i].at(0) == 'q' || c[i].at(0) == 'r' || c[i].at(0) == 's') cout << "7";
        else if(c[i].at(0) == 't' || c[i].at(0) == 'u' || c[i].at(0) == 'v') cout << "8";
        else if(c[i].at(0) == 'w' || c[i].at(0) == 'x' || c[i].at(0) == 'y' || c[i].at(0) == 'z') cout << "9";
 }
 cout << endl;
}

提出情報

提出日時
問題 B - 459
ユーザ Kisaragi2000
言語 C++23 (GCC 15.2.0)
得点 200
コード長 958 Byte
結果 AC
実行時間 1 ms
メモリ 3656 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 2
AC × 20
セット名 テストケース
Sample example_00.txt, example_01.txt
All example_00.txt, example_01.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt
ケース名 結果 実行時間 メモリ
example_00.txt AC 1 ms 3488 KiB
example_01.txt AC 1 ms 3552 KiB
hand_00.txt AC 1 ms 3484 KiB
hand_01.txt AC 1 ms 3516 KiB
hand_02.txt AC 1 ms 3588 KiB
hand_03.txt AC 1 ms 3556 KiB
hand_04.txt AC 1 ms 3572 KiB
hand_05.txt AC 1 ms 3572 KiB
random_00.txt AC 1 ms 3424 KiB
random_01.txt AC 1 ms 3552 KiB
random_02.txt AC 1 ms 3484 KiB
random_03.txt AC 1 ms 3484 KiB
random_04.txt AC 1 ms 3552 KiB
random_05.txt AC 1 ms 3556 KiB
random_06.txt AC 1 ms 3484 KiB
random_07.txt AC 1 ms 3444 KiB
random_08.txt AC 1 ms 3656 KiB
random_09.txt AC 1 ms 3468 KiB
random_10.txt AC 1 ms 3468 KiB
random_11.txt AC 1 ms 3556 KiB