結果
| 問題 |
No.224 文字列変更(easy)
|
| コンテスト | |
| ユーザー |
184
|
| 提出日時 | 2015-06-12 22:22:51 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 352 bytes |
| コンパイル時間 | 501 ms |
| コンパイル使用メモリ | 65,960 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-18 01:59:06 |
| 合計ジャッジ時間 | 1,254 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:16:41: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
16 | int n;char s[1001],t[1001];scanf("%d%s%s",&n,s,t);
| ~~~~~^~~~~~~~~~~~~~~~~
ソースコード
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <map>
#include <vector>
#include <queue>
#include <set>
using namespace std;
//namaega184
int main(){
int n;char s[1001],t[1001];scanf("%d%s%s",&n,s,t);
int ans=0;for(int i=0;i<n;i++)if(s[i]!=t[i])ans++;
printf("%d\n",ans);
return 0;
}
184