結果
| 問題 | 
                            No.1822 Keima of Shogi
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-01-28 21:26:23 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 11 ms / 2,000 ms | 
| コード長 | 138 bytes | 
| コンパイル時間 | 305 ms | 
| コンパイル使用メモリ | 27,136 KB | 
| 最終ジャッジ日時 | 2025-01-27 16:06:41 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 7 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |     scanf("%d", &N);
      |     ~~~~~^~~~~~~~~~
            
            ソースコード
#include<cstdio>
int main(){
    int N;
    scanf("%d", &N);
    int move = (N+1)>>1;
    printf("%lld\n",(long long)move*(move+1)>>1);
}