結果

問題 No.224 文字列変更(easy)
ユーザー tarotaro789
提出日時 2017-03-12 20:18:20
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 262 bytes
コンパイル時間 710 ms
コンパイル使用メモリ 20,608 KB
実行使用メモリ 196,864 KB
最終ジャッジ日時 2024-06-30 00:34:16
合計ジャッジ時間 4,400 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |         scanf("%d",&n);
      |         ^~~~~~~~~~~~~~
main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |         scanf("%s",e);
      |         ^~~~~~~~~~~~~
main.c:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |         scanf("%s",f);
      |         ^~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>
int main(){
	char e[100000000],f[100000000];
	int i,cnt=0,n;
	scanf("%d",&n);
	rewind(stdin);
	
	scanf("%s",e);
	rewind(stdin);
	scanf("%s",f);
	rewind(stdin);
	
	for(i=0;i<n;i++){
		if(e[i]!=f[i])
			cnt++;
	}
	printf("%d",cnt);
	return 0;
}
0