2 solutions
-
0
Guest MOD
- 1
Information
- ID
- 1295
- Time
- 1000ms
- Memory
- 64MiB
- Difficulty
- 10
- Tags
- # Submissions
- 6
- Accepted
- 4
- Uploaded By
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; if(n>6){ int i=30+((n-6)7); cout<<i; }else{ cout<<5n; } return 0; }
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,a;
cin>>n;
if(n<=6&&n>=1){
cout<<5*n;
}
else if(n>6&&n<=10){
a=30+7*n-42;
cout<<a;
}
return 0;
}
By signing up a Hydro universal account, you can submit code and join discussions in all online judging services provided by us.