結果

問題 No.276 連続する整数の和(1)
ユーザー ytqm3
提出日時 2021-05-19 18:43:08
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 81 bytes
コンパイル時間 434 ms
コンパイル使用メモリ 63,552 KB
最終ジャッジ日時 2025-01-21 13:52:10
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<ios>
      |  ^~~~~~
main.cpp:3:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
    3 | main()
      | ^~~~
main.cpp: In function ‘int main()’:
main.cpp:6:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |   scanf("%d",&N);
      |   ~~~~~^~~~~~~~~

ソースコード

diff #

#import<ios>

main()
{
  int N;
  scanf("%d",&N);
  printf("%d\n",(N%2)?N/2:N);
}
0