結果

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

ソースコード

diff #

#include <stdio.h>

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