답안 #22874

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
22874 2017-04-30T07:57:48 Z Jongwon Party(#988, gs13105) Polynomial Quine (KRIII5_PQ) C++14
0 / 7
0 ms 1116 KB
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>

using namespace std;

int main()
{
    //freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);

    int n, i, j;
    scanf("%d", &n);
    if(n == 2)
    {
        printf("0 0\n1 0");
        return 0;
    }
    for(i = 0; i<n; i++)
        printf("0 ");
    printf("\n");
    for(i = 1; i<n; i++)
    {
        printf("%d ", i);
        for(j = 1; j<n; j++)
            printf("%d ", n-i);
        printf("\n");
    }

    return 0;
}

Compilation message

PQ.cpp: In function 'int main()':
PQ.cpp:14:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &n);
                    ^
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1116 KB Output is correct
2 Correct 0 ms 1116 KB Output is correct
3 Incorrect 0 ms 1116 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1116 KB Output is correct
2 Incorrect 0 ms 1116 KB Output isn't correct
3 Halted 0 ms 0 KB -