結果

問題 No.1592 Tenkei 90
ユーザー tadano_amoa
提出日時 2021-07-24 01:49:23
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 407 bytes
コンパイル時間 215 ms
コンパイル使用メモリ 27,904 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-19 02:24:15
合計ジャッジ時間 1,214 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <string.h>
int main(void){

  int i,j,k;
  char S[15];
  char str[15]="kyoprotenkei90";

  scanf("%s",S);

  for(i=0;str[i]!='\0';i++){
    for(j=i;S[j]!='\0';j++){
      if(str[i]==S[j]){
        k=S[j];
        S[j]=S[i];
        S[i]=k;break;
      }
    }
  }
  printf("%s\n",S);

  if(strcmp(S,str)==0){
    printf("Yes\n");
  }
  else{
    printf("No\n");
  }

return 0;
}
0