Submission #3415461


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
int ketawa(int N){
  wa =0;
  while(N != 0){
    wa = wa+N%10;
    N /= 10;
  }
  return wa;
}

int main(){
  int a,b,n;
  cin >>a>>b>>n;
  int ans=0;
  for(int i=1;i<=n;i++){
    int k = wa(i);
    if(k >= a && k <= b) ans++;
  }
  cout << ans << endl;
}
    

Submission Info

Submission Time
Task B - Some Sums
User sanesuke
Language C++14 (GCC 5.4.1)
Score 0
Code Size 327 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int ketawa(int)’:
./Main.cpp:4:3: error: ‘wa’ was not declared in this scope
   wa =0;
   ^
./Main.cpp: In function ‘int main()’:
./Main.cpp:17:17: error: ‘wa’ was not declared in this scope
     int k = wa(i);
                 ^