试题历届真题时间显示【第十二届】【省赛】【B组】.pdfVIP

  • 7
  • 0
  • 约小于1千字
  • 约 2页
  • 2023-04-12 发布于上海
  • 举报

试题历届真题时间显示【第十二届】【省赛】【B组】.pdf

试题历届真题时间显⽰【第⼗⼆届】【省赛】【B组】注意事项有 类型占⽤存储空 间 表数范围 byte1字节-2^7 ~ 2^7-1 (-128~127) short2字节-2^15 ~ 2^15-1 (-32768~32767) int4字节-2^31 ~ 2^31-1 (- 2147483648~2147483647) 约21亿 long4字节-2^31 ~ 2^31-1 long long 8字节-2^63 ~ 2^63-1 c++ 输出前补0 , 头⽂件:iomanip 函数:setw(int n) 函数:setfill(char c) (不调⽤该函数时默认⽤空格进⾏占位) coutsetw(8)setfill(0)123endl; 输出 #includeiostream #includeiomanip using namespace std; int main() { long long time; cintime; time=time/1000; int seconds=0; int minute=0; int hours=0; seconds=time%60; time=time/60; minute=time%60; time=time/60

文档评论(0)

1亿VIP精品文档

相关文档