ans

DOZIE 2022-08-14 21:25:02 9 返回题目

#include <bits/stdc++.h> using namespace std; int main(){ int n , i , a , t = 0; cin >> n; for (i = 1 ; i <= n ; i++){ a = i; while (a != 0){ if (a % 10 == 1){ t++; } a = a / 10; } } cout << t << endl; return 0; }

{{ vote && vote.total.up }}