Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
146163 曾钰涵 15几个数字组成 C++ Compile Error 0 MS 0 KB 210 2026-01-27 12:18:41

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int n,w=0; cin>>n; if(n<0)n=-n; else if(n==0)W=1; while(n!=0){ ++w; n/=10; } cout<<w; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:18: error: 'W' was not declared in this scope
     else if(n==0)W=1;
                  ^