結果
問題 |
No.224 文字列変更(easy)
|
ユーザー |
![]() |
提出日時 | 2017-07-19 22:07:22 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 323 bytes |
コンパイル時間 | 100 ms |
コンパイル使用メモリ | 21,248 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-18 02:24:58 |
合計ジャッジ時間 | 725 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:11:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%d",&n); | ^~~~~~~~~~~~~~ main.c:12:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 12 | scanf("%s",s); | ^~~~~~~~~~~~~ main.c:13:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%s",t); | ^~~~~~~~~~~~~
ソースコード
#include<stdio.h> #include<string.h> int main(){ int n; char s[1001]; char t[1001]; int i,j; int x=0; scanf("%d",&n); scanf("%s",s); scanf("%s",t); for(i=0;i<n;i++){ if(s[i]!=t[i]){ x++; } } printf("%d\n",x); return 0; }