結果
問題 | No.338 アンケート機能 |
ユーザー |
![]() |
提出日時 | 2016-03-03 11:18:44 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 374 bytes |
コンパイル時間 | 206 ms |
コンパイル使用メモリ | 34,520 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-08 03:04:02 |
合計ジャッジ時間 | 1,154 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf( "%d%d", &A, &B ); | ~~~~~^~~~~~~~~~~~~~~~~~
ソースコード
// yukicoder 338 (http://yukicoder.me/problems/814)#include<cstdio>#include<algorithm>#define rep(i,a) for(int i=0;i<(a);++i)int A, B;int main(){scanf( "%d%d", &A, &B );int ans = 200;rep( a, A+1 ) rep( b, B+1 ){int s = a+b;if( A == int(100.0*a/s+0.5) && B == int(100.0*b/s+0.5) )ans = std::min( ans, s );}printf( "%d\n", ans );return 0;}