結果
問題 |
No.51 やる気の問題
|
ユーザー |
|
提出日時 | 2022-01-11 16:14:02 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 415 bytes |
コンパイル時間 | 1,152 ms |
コンパイル使用メモリ | 87,368 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-14 11:39:35 |
合計ジャッジ時間 | 1,964 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | WA * 20 |
ソースコード
#include <iostream> #include <cmath> using namespace std; signed main(){ long long int w , d; cin >> w >> d; long long int rest = w; for( long long int i = d ; i >= 2 ; --i){ if( (i * i) > rest ) continue; else { rest -= static_cast<int>(rest / ( i * i )); cout << "i:" << i << " " << "rest:" << rest << " " << endl;; } } cout << rest << endl; }