Closed jr981008 closed 11 months ago
你用std::cout << (unsigned long long)-1打印也是这个值,你用printf(“%llu”, -1)打印也是这个值。-1本来就不能放入无符号整数里,刚好回环成了ULONGLONG_MAX。
无法顺畅的大口呼吸,是活着的最好证明
---原始邮件--- 发件人: @.> 发送时间: 2023年10月9日(周一) 中午11:50 收件人: @.>; 抄送: @.***>; 主题: [parallel101/course] print 处理 unsigned long long int 输出异常 (Issue #25)
unsigned long long int i1 = -1; print(i1); 预期: -1 实际: 18446744073709551615
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
unsigned long long int i1 = -1; print(i1); 预期: -1 实际: 18446744073709551615