結果
| 問題 | No.3035 文字列のみの反転 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-18 05:26:02 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 388 bytes |
| 記録 | |
| コンパイル時間 | 336 ms |
| コンパイル使用メモリ | 79,444 KB |
| 実行使用メモリ | 5,760 KB |
| 最終ジャッジ日時 | 2026-07-07 06:03:38 |
| 合計ジャッジ時間 | 1,438 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}