結果

問題 No.105 arcの六角ボルト
ユーザー kyunakyuna
提出日時 2018-11-02 23:54:59
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 20 ms / 5,000 ms
コード長 286 bytes
コンパイル時間 338 ms
コンパイル使用メモリ 30,848 KB
実行使用メモリ 6,816 KB
最終ジャッジ日時 2024-04-30 18:19:14
合計ジャッジ時間 879 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
6,816 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:12:51: warning: use of assignment suppression and length modifier together in gnu_scanf format [-Wformat=]
   12 |                 for (int i = 0; i < 5; i++) scanf("%*lf%*lf");
      |                                                   ^~~~~~~~~~
main.cpp:12:51: warning: use of assignment suppression and length modifier together in gnu_scanf format [-Wformat=]
main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |         scanf("%d", &n);
      |         ~~~~~^~~~~~~~~~
main.cpp:9:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |                 scanf("%lf%lf", &x, &y);
      |                 ~~~~~^~~~~~~~~~~~~~~~~~
main.cpp:12:50: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   12 |                 for (int i = 0; i < 5; i++) scanf("%*lf%*lf");
      |                                             ~~~~~^~~~~~~~~~~~

ソースコード

diff #

#include <cstdio>
#include <cmath>
 
int main() {
	double x, y, t;
	int n;
	scanf("%d", &n);
	while (n--) {
		scanf("%lf%lf", &x, &y);
		t = atan2(y, x) / atan(1) * 45 + 180;
		while (t > 51) t -= 60;
		for (int i = 0; i < 5; i++) scanf("%*lf%*lf");
		printf("%f\n", t);
	}
	return 0;
}
0