Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Newton4566

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

Language: cpp

Time: 0.004 second

Submitted On: 2026-09-24 14:26:23

#include <iostream>
#include <string>
using namespace std;

int main() {
    string word;
    cin >> word;

    int count[256] = {0};
    for (unsigned char c : word) {
        count[c]++;
    }

    for (int c = 0; c < 256; c++) {   // scans in ascending order
        if (count[c] == 1) {
            cout << (char)c << endl;
            return 0;
        }
    }

    return 0;
}