1 solutions
-
0
C++ :
#include<bits/stdc++.h> using namespace std; int s; int main() { for(int i=1;i<=10;i++) { for(int j=1;j<=5;j++) { for(int k=1;k<=2;k++) { if(i+j+k==10) s++; } } } cout<<s; return 0; }Pascal :
var s,i,j,k:longint; begin s:=0; for i:=1 to 19 do for j:=1 to 47 do begin k:=100-j*2-i*5; if (k>0) and(i*5+j*2+k=100) then inc(s); end; writeln(s); end.
- 1
Information
- ID
- 18101
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By