結果
| 問題 | No.338 アンケート機能 | 
| コンテスト | |
| ユーザー |  Ysmr_Ry | 
| 提出日時 | 2016-03-03 11:17:41 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 387 bytes | 
| コンパイル時間 | 377 ms | 
| コンパイル使用メモリ | 34,792 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-09-24 13:42:20 | 
| 合計ジャッジ時間 | 1,532 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 26 WA * 2 | 
コンパイルメッセージ
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 repi(i,a,b) for(int i=(a);i<(b);++i)
int A, B;
int main()
{
	scanf( "%d%d", &A, &B );
	int ans = 200;
	repi( a, 1, A+1 ) repi( b, 1, 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;
}
            
            
            
        