結果

問題 No.292 芸名
ユーザー sk3388607083sk3388607083
提出日時 2018-06-22 16:07:54
言語 C++11
(gcc 11.4.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 361 bytes
コンパイル時間 196 ms
コンパイル使用メモリ 24,912 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-13 07:58:14
合計ジャッジ時間 820 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 WA -
testcase_11 AC 1 ms
4,376 KB
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>

int main(void){
  int i, j;
  int t, u, n = 0;
  char S[51], s[51];
  scanf("%s %d %d", S, &t, &u);
  for(i = 0; S[i] != '\0'; i++){
    n++;
    if(i == t || i == u){
      S[i] = '\0';
    }
  }
  for(i = 0, j = 0; i < n; i++){
    if(S[i] != '\0'){
      s[j] = S[i];
      j++;
    }
  }
  S[j] = '\0';
  printf("%s\n", s);
  return 0;
}
0