結果
問題 |
No.338 アンケート機能
|
ユーザー |
![]() |
提出日時 | 2017-02-04 13:44:10 |
言語 | C90 (gcc 12.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 344 bytes |
コンパイル時間 | 479 ms |
コンパイル使用メモリ | 23,040 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-24 06:14:14 |
合計ジャッジ時間 | 1,569 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 RE * 1 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d %d", &a, &b); | ^~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <math.h> #define rep(i, n) for (i = 0; i < n; i++) int main() { int a, b; scanf("%d %d", &a, &b); int i, j; rep(i, 201) rep(j, 201) { int _a = round((double)i / (i + j) * 100); int _b = round((double)j / (i + j) * 100); if (_a == a && _b == b) { printf("%d\n", i + j); return 0; } } return 1; }