結果

問題 No.3036 Nauclhlt型文字列
ユーザー Haniwa
提出日時 2025-10-18 13:27:07
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 397 bytes
コンパイル時間 12,710 ms
コンパイル使用メモリ 398,600 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-10-18 13:27:21
合計ジャッジ時間 13,407 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

use proconio::input;

fn main() {
	input! {
		n: usize,
		s: String,
	}

    if n % 2 != 0 {
        println!("No");
        return;
    }

    let mut x = String::new();
    let mut y = String::new();

    for (i, c) in s.chars().enumerate() {
        if i % 2 == 0 {
            x.push(c);
        } else {
            y.push(c);
        }
    }

    println!("Yes");
    println!("{x} {y}");
}
0