結果
問題 | No.338 アンケート機能 |
ユーザー | h_noson |
提出日時 | 2016-02-19 12:51:12 |
言語 | C++11 (gcc 11.4.0) |
結果 |
CE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 501 bytes |
コンパイル時間 | 1,449 ms |
コンパイル使用メモリ | 52,936 KB |
最終ジャッジ日時 | 2023-08-07 21:39:06 |
合計ジャッジ時間 | 2,511 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:16:13: error: ‘round’ was not declared in this scope if (round(x/(x+y)*100+1e-6) == max(a,b) && round(y/(x+y)*100+1e-6) == min(a,b)) { ^~~~~ main.cpp:16:13: note: suggested alternative: ‘rand’ if (round(x/(x+y)*100+1e-6) == max(a,b) && round(y/(x+y)*100+1e-6) == min(a,b)) { ^~~~~ rand
ソースコード
#include <iostream> #include <vector> #include <algorithm> using namespace std; #define RREP(i,s,e) for (i = e-1; i >= s; i--) #define rrep(i,n) RREP(i,0,n) #define REP(i,s,e) for (i = s; i < e; i++) #define rep(i,n) REP(i,0,n) int main() { int a, b; double x, y; cin >> a >> b; REP (x,1,300) rep(y,x+1) { if (round(x/(x+y)*100+1e-6) == max(a,b) && round(y/(x+y)*100+1e-6) == min(a,b)) { cout << x+y << endl; return 0; } } return 0; }