| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 130085 | huangyifeng2 | 字母概率 | C++ | Compile Error | 0 MS | 0 KB | 516 | 2025-09-07 15:50:34 |
#include<iostream> #include<string> #include<cctype> #include<format> using namespace std; int main() { string str; char ch; int num = 0; while (true) { cin >> ch >> str; int a = str.length(); for (int i = 0; i < a; i++){ if (ch == str[i] || toupper(ch) == str[i]) { num++; } } printf("%.5f\n", (float)num / a); // std::cout <<std::format("{:.5f}\n", (float)num / a); } }
Main.cc:4:17: fatal error: format: No such file or directory
#include
^
compilation terminated.