ZJANS

c659. 連接詞

Beginner Last Update: 2026/01/22
基礎 IO

解法一

✅ 完整代碼

評分結果(參考) : AC (2ms, 340KB)

#include<bits/stdc++.h>
#define int long long
using namespace std;

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    string s, conj;
    cin >> conj;
    
    cin >> s;
    cout << s;
    
    while(cin >> s){
        cout << " " << conj << " " << s;
    }
    
    return 0;
}