| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 91999 | sh25_shenpy | 常数与常量实验 | C++ | 通过 | 0 MS | 240 KB | 682 | 2026-06-21 11:45:12 |
#include <bits/stdc++.h> using namespace std; // 用define定义八进制常量77 #define oct1 077 // 用const定义十六进制整型常量FF const int hex1 = 0xFF; // 用const定义字符串常量 const char str1[] = "Welcome"; // 用const定义字符双引号 const char dq1 = '"'; // 用define定义换行符 #define nl1 '\n' // 用define定义字符串 #define str2 "Great!" // 用const定义pi const double pi = 3.14159; int main() { cout << oct1 << endl; cout << hex1 << endl; cout << str1 << endl; cout << dq1 << endl; cout << nl1 << endl; cout << str2 << endl; cout << pi * 100 << endl; return 0; }