結果
| 問題 |
No.224 文字列変更(easy)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-09-23 19:38:11 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 497 bytes |
| コンパイル時間 | 2,946 ms |
| コンパイル使用メモリ | 275,828 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-09-23 19:38:16 |
| 合計ジャッジ時間 | 4,318 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
[[nodiscard]] static inline constexpr uint_fast32_t solve(const uint_fast32_t n, const std::string& S, const std::string& T) noexcept
{
uint_fast32_t ans = 0;
for (uint_fast32_t i = 0; i < n; ++i)
if (S[i] != T[i]) ++ans;
return ans;
}
int main()
{
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
uint_fast32_t n;
std::string S, T;
std::cin >> n;
S.reserve(n), T.reserve(n);
std::cin >> S >> T;
std::cout << solve(n, S, T) << '\n';
return 0;
}