1 条题解

  • 0
    @ 2021-6-15 13:13:18

    C :

    #include "stdio.h"
    int main()
    {
        int n=31;
        printf("%d\n",n);
    }
    
    
    

    Pascal :

    var i,j,k,l,h,g,sum:longint;
    f:array[0..42] of boolean;
    begin
    for i:=0 to 1 do
         for j:=0 to 1 do
             for k:=0 to 1 do
                 for l:=0 to 1 do
                     for h:=0 to 1 do
                         for g:=0 to 1 do
                              f[i*2+j*3+k*5+l*7+h*10+g*15]:=true;
    for i:=1 to 42 do
         if f[i] then
            inc(sum);
         writeln(sum);
    end.
    
    • 1

    信息

    ID
    932
    时间
    1000ms
    内存
    64MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者