Submission #00083
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #include <bits/stdc++.h> using namespace std; int main() { while (1) { string s; cin >> s; if (s == "#" ) { return (0); } string a = "" , b = "" , c = "" ; for ( int i = 0; i < s.size(); i++) { if ( 'a' <= s[i] && s[i] <= 'z' ) { a += s[i]; } else if ( 'A' <= s[i] && s[i] <= 'Z' ) { b += s[i]; } else { c += s[i]; } } sort(a.begin(), a.end()); sort(b.begin(), b.end()); sort(c.begin(), c.end()); cout << a << b << c << "\n" ; } return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0005 - クレヨンの並べ替え |
ユーザー名 | woody_1227 |
投稿日時 | 2024-03-29 12:11:38 |
言語 | C++17 |
状態 | Accepted |
得点 | 20 |
ソースコード長 | 665 Byte |
最大実行時間 | 30 ms |
最大メモリ使用量 | 628 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 20 / 20 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
A1 | AC | 27 ms | 604 KB |
1
|
A2 | AC | 23 ms | 568 KB |
1
|
A3 | AC | 30 ms | 536 KB |
1
|
A4 | AC | 24 ms | 628 KB |
1
|