結果
| 問題 |
No.249 N言っちゃダメゲーム (2)
|
| コンテスト | |
| ユーザー |
nanasili
|
| 提出日時 | 2015-07-31 10:21:33 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 642 bytes |
| コンパイル時間 | 621 ms |
| コンパイル使用メモリ | 82,788 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-17 22:53:22 |
| 合計ジャッジ時間 | 1,552 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 1 RE * 2 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:31:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
31 | scanf("%d %d", &n, &k);
| ~~~~~^~~~~~~~~~~~~~~~~
ソースコード
#include <algorithm>
#include <vector>
#include <cfloat>
#include <string>
#include <cmath>
#include <set>
#include <cstdlib>
#include <map>
#include <ctime>
#include <iomanip>
#include <functional>
#include <deque>
#include <iostream>
#include <cstring>
#include <queue>
#include <cstdio>
#include <stack>
#include <climits>
#include <sys/time.h>
#include <cctype>
using namespace std;
typedef long long ll;
int main() {
int n, k;
int ans = 0;
bool b = true;
for (int i = 0; i < 100; i++) {
scanf("%d %d", &n, &k);
if ((n+1)%(k+1) == 1) {
if (b) {
ans++;
}
b = false;
}
}
printf("%d\n", ans);
}
nanasili