acgo题库
  • 首页
  • 题库
  • 学习
  • 天梯
  • 备赛

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
  • 资讯
  • 竞赛
  • 讨论
  • 团队
  • 商城
登录
注册
题目详情提交记录(0)
  • 题解,包对包会

    执行用时:4ms 内存消耗:1.38MB 击败了99.86%的用户 击败了100.00%的用户 #include <unistd.h> static char inBuf[1 << 16]; static int inLen = 0, inPos = 0; inline int readChar() { if (inPos == inLen) { inLen = read(0, inBuf, sizeof(inBuf)); inPos = 0; if (inLen <= 0) return -1; } return inBuf[inPos++]; } static char outBuf[1 << 16]; static int outLen = 0; inline void outChar(char c) { outBuf[outLen++] = c; if (outLen == (int)sizeof(outBuf)) { write(1, outBuf, outLen); outLen = 0; } } inline void outInt(int v) { char tmp[12]; int tl = 0; if (v == 0) tmp[tl++] = '0'; else while (v) { tmp[tl++] = '0' + v % 10; v /= 10; } while (tl) outChar(tmp[--tl]); } int main() { int t = 0; int c = readChar(); while (c <= ' ') c = readChar(); while (c > ' ') { t = t * 10 + (c - '0'); c = readChar(); } }

    userId_undefined
    Liu(互关)
    出道萌新秩序白银时空双修者快乐小狗
    14阅读
    1回复
    1点赞
暂无数据

提交答案之后,这里将显示提交结果~

首页