結果
問題 | No.2143 Only One Bracket |
ユーザー |
|
提出日時 | 2022-12-17 17:10:40 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 312 bytes |
コンパイル時間 | 12,675 ms |
コンパイル使用メモリ | 379,860 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 02:20:53 |
合計ジャッジ時間 | 13,687 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 7 |
ソースコード
fn main() {let mut n = String::new();std::io::stdin().read_line(&mut n).ok();let n: usize = n.trim().parse().unwrap();for i in 0..n {let left = ")".repeat(i);let right = if i+1 == n { String::new() } else { "(".repeat(i+1) };println!("{}{}", left, right);}}