結果
| 問題 |
No.1422 Social Distance in Train
|
| ユーザー |
y61mpnl
|
| 提出日時 | 2021-03-20 14:54:19 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 135 bytes |
| コンパイル時間 | 427 ms |
| コンパイル使用メモリ | 27,008 KB |
| 最終ジャッジ日時 | 2025-01-19 20:14:53 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
ソースコード
#include<cstdio>
#include<cstdint>
int main(){
int n;
scanf("%d", &n);
if(n&1) puts("1");
else printf("%d\n", n/2+1);
return 0;
}
y61mpnl