結果
| 問題 |
No.51 やる気の問題
|
| コンテスト | |
| ユーザー |
Knots
|
| 提出日時 | 2020-11-06 15:23:32 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 503 bytes |
| コンパイル時間 | 2,067 ms |
| コンパイル使用メモリ | 190,876 KB |
| 最終ジャッジ日時 | 2025-01-15 20:03:19 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 RE * 6 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:12:28: warning: ‘saygo’ may be used uninitialized [-Wmaybe-uninitialized]
12 | #define COUT(x) cout<<(x)<<"\n"
| ^~~~
main.cpp:23:5: note: in expansion of macro ‘COUT’
23 | COUT(saygo);
| ^~~~
main.cpp:18:9: note: ‘saygo’ was declared here
18 | int saygo;
| ^~~~~
ソースコード
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;
using pii = pair<int,int>;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) for(int i=0;i<(n);++i)
#define COUT(x) cout<<(x)<<"\n"
#define COUT15(x) cout << fixed << setprecision(15) << (x) << "\n";
int main(){
ll w,d;
cin >> w >> d;
int saygo;
for(int i=d;i>0;i--){
saygo = w/(i*i);
w -= saygo;
}
COUT(saygo);
}
Knots