結果

問題 No.354 メルセンヌ素数
コンテスト
ユーザー Yatsuku
提出日時 2016-08-17 21:56:26
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 157 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 233 ms
コンパイル使用メモリ 27,840 KB
最終ジャッジ日時 2026-02-23 22:16:22
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 13
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:25: warning: format ‘%u’ expects argument of type ‘unsigned int *’, but argument 3 has type ‘uint_least64_t *’ {aka ‘long unsigned int *’} [-Wformat=]
    8 |         fscanf(stdin, "%u", &inputNum);
      |                        ~^   ~~~~~~~~~
      |                         |   |
      |                         |   uint_least64_t * {aka long unsigned int *}
      |                         unsigned int *
      |                        %lu
main.c:9:27: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘uint_least64_t’ {aka ‘long unsigned int’} [-Wformat=]
    9 |         fprintf(stdout, "%u\n", inputNum);
      |                          ~^     ~~~~~~~~
      |                           |     |
      |                           |     uint_least64_t {aka long unsigned int}
      |                           unsigned int
      |                          %lu
main.c:8:9: warning: ignoring return value of ‘fscanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |         fscanf(stdin, "%u", &inputNum);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #
raw source code

#include <stdint.h>
#include <stdio.h>

int main(void)
{
	uint_least64_t inputNum;	

	fscanf(stdin, "%u", &inputNum);	
	fprintf(stdout, "%u\n", inputNum);
}
0