fork download
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4. int n;
  5. int a[1000];
  6. int main() {
  7. freopen("tinhtong.inp","r",stdin);
  8. freopen("tinhtong.out","w",stdout);
  9. cin>>n;
  10. for(int i=1;i<=n;i++) cin>>a[i];
  11. int s=0;
  12. for (int i=1;i<=n;i++)
  13. {
  14. if (a[i]%10 > (a[i]%100)/10) s+=a[i];
  15.  
  16. }
  17. cout<<s;
  18. return 0;
  19. }
Success #stdin #stdout 0.01s 5292KB
stdin
5
15 141 28 66 79
stdout
Standard output is empty