結果
| 問題 |
No.3035 文字列のみの反転
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-18 05:26:02 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 388 bytes |
| コンパイル時間 | 868 ms |
| コンパイル使用メモリ | 67,552 KB |
| 実行使用メモリ | 7,324 KB |
| 最終ジャッジ日時 | 2025-03-18 05:26:04 |
| 合計ジャッジ時間 | 1,724 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 3 WA * 9 |
ソースコード
#include <iostream>
#include <string>
int main() {
std::string s;
std::cin >> s;
std::string digits;
std::string nonDigits;
for (int i = s.length() - 1; i >= 0; --i) {
if (std::isdigit(s[i])) {
digits += s[i];
} else {
nonDigits += s[i];
}
}
std::cout << nonDigits;
std::cout << digits;
return 0;
}