結果

問題 No.46 はじめのn歩
ユーザー IobachevskyIobachevsky
提出日時 2016-03-28 22:48:54
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 1,067 bytes
コンパイル時間 774 ms
コンパイル使用メモリ 83,568 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-10 05:14:45
合計ジャッジ時間 1,491 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 1 ms
6,940 KB
testcase_04 AC 2 ms
6,944 KB
testcase_05 AC 2 ms
6,944 KB
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 2 ms
6,944 KB
testcase_09 AC 1 ms
6,944 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:42:11: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   42 |      scanf("%ld %ld", &a,&b);
      |      ~~~~~^~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <iostream>
#include <stdio.h>
#include <sstream>
#include <fstream>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <stdio.h>
#include <string.h>
using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FORD(i, a, b) for(int i = (a); i >= (b); --i)
#define FORE(i, c) for(auto i = (c).begin(); i != (c).end(); ++i)
#define all(v) (v).begin(),(v).end()
 
#define vi vector<int>
#define pii pair<int,int>
#define X first
#define Y second
#define mp make_pair
#define pb push_back
 
#define debug(x) {cerr <<#x <<" = " <<x <<endl; }
#define debugv(x) {{cerr <<#x <<" = "; FORE(itt, (x)) cerr <<*itt <<", "; cerr <<endl; }}
#define debugt(t,n) {{cerr <<#t <<" = "; FOR(it,0,(n)) cerr <<t[it] <<", "; cerr <<endl; }}

#define ull unsigned long long

int main(){
     long a,b;
     scanf("%ld %ld", &a,&b);
     printf("%ld\n", 1L*b/a + 1L*(b%a!=0));
}
0