Browse Source

Add 'A.cpp'

webturing 4 years ago
parent
commit
12db33b5eb
1 changed files with 24 additions and 0 deletions
  1. 24 0
      A.cpp

+ 24 - 0
A.cpp

@@ -0,0 +1,24 @@
+#include<bits/stdc++.h>
+using namespace std;
+int Length(int n){
+    int s=0;
+    while(n>0){
+        n=n/10;
+        ++s;
+    }
+    return s;
+}
+int main(){
+    int n;
+    cin>>n;
+    cout<<Length(n);
+    return 0;
+}
+/**************************************************************
+    Problem: 2263
+    User: acm
+    Language: C++
+    Result: 正确
+    Time:0 ms
+    Memory:2016 kb
+****************************************************************/