Browse Source

Add 'L.cpp'

webturing 4 years ago
parent
commit
ba91640c93
1 changed files with 16 additions and 0 deletions
  1. 16 0
      L.cpp

+ 16 - 0
L.cpp

@@ -0,0 +1,16 @@
+#include<bits/stdc++.h>
+using namespace std;
+int First(long long n){
+    while(n>=10)n/=10;
+    return n;
+}
+int main() {
+    int T;
+    cin >> T;
+    while (T--) {
+        long long n;
+        cin >> n;
+        cout << First(n) << endl;
+    }
+    return 0;
+}