結果
問題 |
No.3035 文字列のみの反転
|
ユーザー |
|
提出日時 | 2025-05-20 19:37:55 |
言語 | C# (.NET 8.0.404) |
結果 |
AC
|
実行時間 | 50 ms / 2,000 ms |
コード長 | 446 bytes |
コンパイル時間 | 10,764 ms |
コンパイル使用メモリ | 170,932 KB |
実行使用メモリ | 186,004 KB |
最終ジャッジ日時 | 2025-05-20 19:38:08 |
合計ジャッジ時間 | 12,615 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (95 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System; using System.Linq; public class Hello { static void Main() { string input = Console.ReadLine(); inversion(input); } static void inversion(string s) { string cash = ""; string num = ""; foreach ( char c in s) { if(char.IsNumber(c)) { num += c; } else { cash += c; } } s = new string(cash.Reverse().ToArray()); s += num; Console.WriteLine(s); } }