結果
| 問題 |
No.51 やる気の問題
|
| コンテスト | |
| ユーザー |
Torin3600
|
| 提出日時 | 2017-05-05 23:25:32 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 288 bytes |
| コンパイル時間 | 966 ms |
| コンパイル使用メモリ | 54,264 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-14 09:14:35 |
| 合計ジャッジ時間 | 4,658 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 RE * 2 |
| other | RE * 20 |
コンパイルメッセージ
main.cpp: In member function ‘long int ld::ldc(long int, long int)’:
main.cpp:12:20: warning: control reaches end of non-void function [-Wreturn-type]
12 | ldc(w-long((w/(d*d))),d-1);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <iostream>
using namespace std;
class ld{
public:
long ldc(long w,long d);
};
long ld::ldc(long w,long d){
if(d==1){
return long ((w/d*d));
}else{
ldc(w-long((w/(d*d))),d-1);
}
}
int main() {
ld l;
int w,d;
cin >> w >> d;
cout << l.ldc(w,d) << endl;
return 0;
}
Torin3600