結果
| 問題 |
No.224 文字列変更(easy)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-17 22:32:48 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 218 bytes |
| コンパイル時間 | 2,256 ms |
| コンパイル使用メモリ | 158,720 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-27 15:40:22 |
| 合計ジャッジ時間 | 3,313 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 22 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:12:13: warning: ‘ans’ may be used uninitialized in this function [-Wmaybe-uninitialized]
12 | cout << ans << endl;
| ^~~
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
string S,T;
int n,ans;
cin >> n >> S >> T;
for(int i=0;i<n;i++){
if(S[i]!=T[i]) ans++;
}
cout << ans << endl;
return 0;
}