結果
問題 | No.744 循環小数N桁目 Easy |
ユーザー | math957963 |
提出日時 | 2018-10-19 21:22:41 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 648 bytes |
コンパイル時間 | 324 ms |
コンパイル使用メモリ | 57,188 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-04-29 15:11:16 |
合計ジャッジ時間 | 765 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 1 ms
5,376 KB |
testcase_04 | AC | 0 ms
5,376 KB |
testcase_05 | AC | 0 ms
5,376 KB |
testcase_06 | AC | 0 ms
5,376 KB |
testcase_07 | AC | 0 ms
5,376 KB |
testcase_08 | AC | 1 ms
5,376 KB |
testcase_09 | AC | 0 ms
5,376 KB |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:24:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 24 | scanf("%d", &n); | ~~~~~^~~~~~~~~~
ソースコード
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> #include<functional> #include<vector> #include<queue> #include<stack> #include<set> #include<map> using namespace std; #define MOD 1000000007 #define f(i,n) for(int i=0;i<int(n);i++) #define N 200000 int main(){ int n, k; int x, y, z; int s, ans; bool v = true; ans = 0; scanf("%d", &n); if (n % 6 == 0){ printf("4\n"); } else if (n % 6 == 1){ printf("2\n"); } else if(n % 6 == 2){ printf("8\n"); } else if(n % 6 == 3){ printf("5\n"); } else if(n % 6 == 4){ printf("7\n"); } else if(n % 6 == 5){ printf("1\n"); } return 0; }