結果

問題 No.63 ポッキーゲーム
ユーザー Jojikkkkk
提出日時 2020-10-05 08:50:02
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 281 bytes
コンパイル時間 491 ms
コンパイル使用メモリ 69,932 KB
最終ジャッジ日時 2025-01-15 02:51:25
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>

using namespace std;

int main(){

  int k,n,z=0,f;
  cin >> k >> n;
  int flag = 1;
  f = n;
  while(flag == 1){

    if(n<k/2){
      z += f;
      flag = 1;
      n += f;
    }else
      flag = 0;
  }

  cout << z << endl;

  return 0;
}
0