题解 | 复读机

复读机

https://www.nowcoder.com/practice/9d381551b6ab40c4b5c3c8d60fe4066e

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

typedef long long ll;

int main() {
    ios::sync_with_stdio(false), cin.tie(0);
    cout << fixed << setprecision(1);

    int a;
    ll b;
    double c; char d;
    string e;

    cin >> a >> b >> c >> d >> e;
    cout << a << '\n' << b << '\n' << c << '\n' << d << '\n' << e << '\n';
    cout.unsetf(ios::fixed);
    cout.flush();
}

//
//#include <bits/stdc++.h>
//using namespace std;
//
//typedef long long ll;
//
//int main() {
//    ios::sync_with_stdio(false), cin.tie(0);
//
//    int a;
//    ll b; 
//    double c; char d;
//    string e;
//    
//    cin >> a >> b >> c >> d >> e;
//    cout << a << '\n' << b << '\n' << fixed << 
//       setprecision(1) <<  c << '\n' << d << '\n' << e << '\n';
//    cout.flush();
//
//}

全部评论
ios::sync_with_stdio(false), cin.tie(0); cout << fixed << setprecision(1); 请问这串代码的作用是什么
2 回复 分享
发布于 2025-10-21 16:56 天津

相关推荐

评论
2
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务