結果
問題 |
No.964 2020
|
ユーザー |
![]() |
提出日時 | 2020-01-13 21:04:43 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,020 ms |
コード長 | 447 bytes |
コンパイル時間 | 256 ms |
コンパイル使用メモリ | 28,928 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-22 20:46:50 |
合計ジャッジ時間 | 924 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 |
コンパイルメッセージ
main.c: In function 'in': main.c:6:14: warning: implicit declaration of function 'getchar_unlocked' [-Wimplicit-function-declaration] 6 | #define gc() getchar_unlocked() | ^~~~~~~~~~~~~~~~ main.c:10:24: note: in expansion of macro 'gc' 10 | int n = 0, c = gc(); | ^~ main.c: In function 'main': main.c:7:15: warning: implicit declaration of function 'putchar_unlocked' [-Wimplicit-function-declaration] 7 | #define pc(c) putchar_unlocked(c) | ^~~~~~~~~~~~~~~~ main.c:20:21: note: in expansion of macro 'pc' 20 | if (N == 1) pc('1'); | ^~
ソースコード
// yuki 964 2020 // 2019.1.13 bal4u #include <stdio.h> #define gc() getchar_unlocked() #define pc(c) putchar_unlocked(c) int in() { // 非負整数の入力 int n = 0, c = gc(); do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0'); return n; } int main() { int i, j, n, N; N = in(); if (N == 1) pc('1'); else { n = N; if (N == 10) n--; i = N; while (i--) { j = N; while (j--) pc('0'+n); n--; } } pc('\n'); return 0; }