結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー goodbatongoodbaton
提出日時 2015-08-01 01:21:37
言語 C++11
(gcc 11.4.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 743 bytes
コンパイル時間 927 ms
コンパイル使用メモリ 71,396 KB
実行使用メモリ 24,312 KB
平均クエリ数 3.40
最終ジャッジ日時 2023-09-23 05:23:11
合計ジャッジ時間 3,895 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 44 ms
23,412 KB
testcase_02 AC 44 ms
24,252 KB
testcase_03 AC 45 ms
23,820 KB
testcase_04 WA -
testcase_05 AC 45 ms
23,472 KB
testcase_06 AC 45 ms
24,048 KB
testcase_07 AC 43 ms
23,628 KB
testcase_08 AC 43 ms
23,412 KB
testcase_09 AC 45 ms
24,312 KB
testcase_10 AC 45 ms
23,532 KB
testcase_11 AC 44 ms
23,532 KB
testcase_12 AC 43 ms
24,060 KB
testcase_13 AC 44 ms
23,820 KB
testcase_14 AC 43 ms
24,228 KB
testcase_15 AC 45 ms
24,312 KB
testcase_16 WA -
testcase_17 AC 43 ms
23,628 KB
testcase_18 AC 43 ms
23,412 KB
testcase_19 WA -
testcase_20 AC 45 ms
23,928 KB
testcase_21 AC 45 ms
23,376 KB
testcase_22 AC 45 ms
24,120 KB
testcase_23 AC 44 ms
23,736 KB
testcase_24 AC 43 ms
24,120 KB
testcase_25 AC 44 ms
23,472 KB
testcase_26 AC 44 ms
24,252 KB
testcase_27 AC 43 ms
23,832 KB
testcase_28 AC 44 ms
24,228 KB
testcase_29 AC 44 ms
23,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <cstring>

typedef long long ll;
using namespace std;

#define mod 1000000009
#define INF 10000000
#define LLINF 2000000000000000000LL

#define SIZE 10001


int main(){
    int n,k;
    int s,b=0;
    int f = true;
    scanf("%d%d",&n,&k);
    
    int a = (n-1)%(k+1);
    
    while(1){
        
        if(f && a==0){
            cout << 0 << endl;
        }else{
            cout << a << endl;
            a+=k+1;
        }
        
        scanf("%d",&b);
        
        f = false;
        if(b>=n) break;
    }
    
    return 0;
}
0