結果

問題 No.3195 Three-Letter Acronym
コンテスト
ユーザー vjudge1
提出日時 2025-12-06 01:42:54
言語 C
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 494 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 183 ms
コンパイル使用メモリ 38,244 KB
最終ジャッジ日時 2026-02-22 13:53:09
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void) {
    char str[10001];
    fgets(str,sizeof(str),stdin);
    str[strcspn(str,"\n")] = '\0';
    int n = strlen(str);
    char output[100];
    int j = 1;
    if(n>=1){
      output[0] = str[0]-32;
    }
    else{
      j = 0;
    }
    for (int i = 0; i < n; i++){
        if(str[i]==' '){
          output[j++] = str[i+1] - 32;
        }
    }
    output[j] = '\0';
    printf("%s",output);
    
    
    return 0;
}

0