結果

問題 No.128 お年玉(1)
ユーザー mds_boy
提出日時 2015-01-16 23:32:17
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 333 bytes
コンパイル時間 434 ms
コンパイル使用メモリ 54,412 KB
実行使用メモリ 9,768 KB
最終ジャッジ日時 2024-10-01 09:43:46
合計ジャッジ時間 7,104 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 4 WA * 3 TLE * 1 -- * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
typedef long long LL;
int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	LL n;
	int m;
	cin >> n >> m;
	
	if(n <= 1000){
		cout << 0 << endl;
		return 0;
	}
	
	for(LL i = 0; i != n; i += 1000){
		if((n - i) % m == 0){
			cout << (n - i) / m << endl;
			return 0;
		}
	}
	
	return 0;
}
0