結果

問題 No.1592 Tenkei 90
ユーザー Maeda
提出日時 2025-03-28 11:51:45
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 604 bytes
コンパイル時間 325 ms
コンパイル使用メモリ 24,832 KB
実行使用メモリ 7,324 KB
最終ジャッジ日時 2025-03-28 11:51:46
合計ジャッジ時間 1,561 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |     scanf("%s",str);
      |     ^~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>
#include <stdbool.h>

void main(void){
    char sample[] = "kyoprotenkei90";
    char str[20] = "a";
    scanf("%s",str);
    bool tenkei90Flg = true;
    for(int i = 0 ; i < 14 ; i++){
        bool changeFlg = false;
        for(int j = 0 ; j < 14 ; j++ ){
            if(str[i] == sample[j]){
                changeFlg = true;
                sample[j] = 'A';
                break;
            }
        }
        if(!changeFlg){
            tenkei90Flg = false;
            break;
        }
    }
    if(tenkei90Flg){
        printf("Yes");
    }else{
        printf("No");
    }
}
0