結果

問題 No.1992 Tendon Walk
ユーザー LV3zJigVW57oPGyLV3zJigVW57oPGy
提出日時 2022-07-18 18:15:01
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 285 bytes
コンパイル時間 1,235 ms
コンパイル使用メモリ 159,184 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-30 18:18:08
合計ジャッジ時間 1,816 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 1 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;


int main() {
int a;
cin >> a;
int b;
  if (a>4)
  {
   a = a - 4;
   b = (a / 2) * 10 + 4;
     if (a % 2 == 1)
     { b += 1;
     }
    cout << b;
  }
   else
   { b = (a / 2) * 2;
    if (a % 2 == 1)
    {b +=1;
    cout << b;}
   }
}
0