結果

問題 No.3035 文字列のみの反転
ユーザー ジュ・ビオレ・グレイス
提出日時 2025-02-28 21:25:44
言語 D
(dmd 2.109.1)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 243 bytes
コンパイル時間 2,605 ms
コンパイル使用メモリ 60,704 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2025-02-28 21:25:48
合計ジャッジ時間 3,234 ms
ジャッジサーバーID
(参考情報)
judge6 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.stdio, std.array, std.algorithm;

void main() {
	auto str = readln;
	string eng;
	foreach (c; str) {
		if ('a' <= c && c <= 'z') {
			eng ~= c;
		}
		else break;
	}
	foreach_reverse (c; eng) write(c);
	write(str[eng.length .. $]);
}
0