結果
問題 | No.3036 Nauclhlt型文字列 |
ユーザー |
![]() |
提出日時 | 2025-02-28 21:29:39 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 5 ms / 2,000 ms |
コード長 | 284 bytes |
コンパイル時間 | 2,522 ms |
コンパイル使用メモリ | 60,648 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-02-28 21:29:49 |
合計ジャッジ時間 | 1,003 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 |
ソースコード
import std.stdio, std.array, std.algorithm;void main() {readln;auto str = readln[0 .. $-1];if (str.length % 2 == 1) writeln("No");else {string str1, str2;foreach (i, c; str) {if (i%2 == 0) str1 ~= c;else str2 ~= c;}writeln("Yes\n", str1, " ", str2);}}