結果
| 問題 | 
                            No.105 arcの六角ボルト
                             | 
                    
| コンテスト | |
| ユーザー | 
                             kyuna
                         | 
                    
| 提出日時 | 2018-11-02 23:54:59 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 23 ms / 5,000 ms | 
| コード長 | 286 bytes | 
| コンパイル時間 | 660 ms | 
| コンパイル使用メモリ | 30,848 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-20 15:45:02 | 
| 合計ジャッジ時間 | 1,120 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 1 | 
コンパイルメッセージ
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");
      |                                             ~~~~~^~~~~~~~~~~~
            
            ソースコード
#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;
}
            
            
            
        
            
kyuna