Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: uraniumconsumer

Problemset: ตัวอักษรตัวแรกในคำ

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-03 15:41:22

#include <bits/stdc++.h>
using namespace std;

int main(){
    int count[26] = {0};
    int isfirst;
    string word;
    cin >> word;
    for(int i = 0; i < word.length(); i++){
        int incount = word[i] - 'A';
        count[incount] += 1;
    }
    for(int i = 0; i < 26; i++){
        if(count[i] == 1){
            cout << char(65 + i);
            break;
        }
    }
}