#include using namespace std; int main(){ int cnt=0; for(int i=1;i<=12;i++){ for(int j=1;j<31;j++){ int k=j; int temp=0; while(k){ temp+=k%10; k/=10; } if(temp==i) cnt++; } } cout<