結果

問題 No.494 yukicoder
ユーザー toto
提出日時 2025-03-27 15:32:15
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 233 bytes
コンパイル時間 387 ms
コンパイル使用メモリ 27,776 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2025-03-27 15:32:16
合計ジャッジ時間 1,179 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |         scanf("%s",memo);
      |         ~~~~~^~~~~~~~~~~

ソースコード

diff #

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

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