1 solutions
-
0
C :
#include<stdio.h> main() { int a,b; for(a = 1;a<98;a++) { for(b = 1;b<98;b++) { if(a*2+b*4 == 386 && a+b == 98) printf("%d,%d",a,b); } } return 0; }C++ :
#include<iostream> using namespace std; int main() {int c,r; for(c=0;c<=98;c++) { r=98-c; if(386==c*2+r*4) cout<<c<<","<<r<<endl; }return 0; }
- 1
Information
- ID
- 17334
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By