結果

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

ソースコード

diff #

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

int main(){
	char *ans = "yukicoder";
	char str[10] = "test";
	scanf("%s",str);
	int len = strlen(str);
	
	for(int i  = 0;i < len;i++){
		if(str[i] == '?'){
			printf("%c",*(str + i));
		}
	}
}
0