提交记录 27447
提交时间 |
评测时间 |
2024-11-28 20:55:46 |
2024-11-28 20:55:48 |
#include <stdint.h>
#include <iostream>
#include <cpuid.h>
static void cpuid(uint32_t func, uint32_t sub, uint32_t data[4]) {
__cpuid_count(func, sub, data[0], data[1], data[2], data[3]);
}
int main() {
uint32_t data[4];
char str[48];
for(int i = 0; i < 3; ++i) {
cpuid(0x80000002 + i, 0, data);
for(int j = 0; j < 4; ++j)
reinterpret_cast<uint32_t*>(str)[i * 4 + j] = data[j];
}
std::cout << "CPU is " << str << '\n';
std::cout << sizeof(long) * 8 << "bit OS.\n";
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 45.13 us | 36 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-12-04 10:05:42 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠