結果

問題 No.809 かけ算
ユーザー bal4ubal4u
提出日時 2019-04-13 13:47:22
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 309 bytes
コンパイル時間 1,175 ms
コンパイル使用メモリ 26,180 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-13 14:17:32
合計ジャッジ時間 1,703 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
4,348 KB
testcase_01 AC 0 ms
4,348 KB
testcase_02 AC 0 ms
4,348 KB
testcase_03 AC 0 ms
4,352 KB
testcase_04 AC 1 ms
4,352 KB
testcase_05 AC 0 ms
4,352 KB
testcase_06 AC 0 ms
4,348 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: 関数 ‘main’ 内:
main.c:8:15: 警告: 関数 ‘putchar_unlocked’ の暗黙的な宣言です [-Wimplicit-function-declaration]
    8 | #define pc(c) putchar_unlocked(c)
      |               ^~~~~~~~~~~~~~~~
main.c:17:9: 備考: in expansion of macro ‘pc’
   17 |         pc('1'), pc(' ');
      |         ^~
main.c:7:14: 警告: 関数 ‘getchar_unlocked’ の暗黙的な宣言です [-Wimplicit-function-declaration]
    7 | #define gc() getchar_unlocked()
      |              ^~~~~~~~~~~~~~~~
main.c:18:21: 備考: in expansion of macro ‘gc’
   18 |         while ((c = gc()) >= '0') pc(c);
      |                     ^~

ソースコード

diff #

// yukicoder: No.182 新規性の虜
// 2019.4.13 bal4u

#include <stdio.h>

#if 1
#define gc() getchar_unlocked()
#define pc(c) putchar_unlocked(c)
#else
#define gc() getchar()
#define pc(c) putchar(c)
#endif

int main()
{
	int c;
	pc('1'), pc(' ');
	while ((c = gc()) >= '0') pc(c);
	pc('\n');
	return 0;
}
0