結果
問題 | No.276 連続する整数の和(1) |
ユーザー |
![]() |
提出日時 | 2017-01-01 22:15:24 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 167 bytes |
コンパイル時間 | 248 ms |
コンパイル使用メモリ | 19,968 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-16 05:21:37 |
合計ジャッジ時間 | 714 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:5:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d", &n); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>int main() {int n;scanf("%d", &n);if (n == 1) puts("1");else if (n % 2) printf("%d\n", n);else printf("%d\n", n / 2);return 0;}