| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 73507 | 刘浩宇 | 单价最高的书 | C++ | Wrong Answer | 0 MS | 280 KB | 559 | 2024-05-19 11:51:09 |
#include <iostream> #include <string> struct Book { int id; std::string title; int quantity; double price; }; int main() { int n; std::cin >> n; Book books[100]; for (int i = 0; i < n; ++i) { std::cin >> books[i].id >> books[i].title >> books[i].quantity >> books[i].price; } for (int i = 0; i < n; ++i) { std::cout << books[i].id << " " << books[i].title << books[i].quantity << " " << books[i].price << "\n"; } return 0; }
------Input------
3 1 Cinderella 12 120 2 Hoodwinked 10 150 3 Thumbelina 15 120
------Answer-----
2 Hoodwinked 10 150 15
------Your output-----
1 Cinderella12 120 2 Hoodwinked10 150 3 Thumbelina15 120