2017-03-07から1日間の記事一覧
paiza.jp #include <iostream> using namespace std; void Solve(int n) { cout << (n%7? "unlucky" : "lucky") << endl; } int main(void) { int n; cin >> n; Solve(n); return 0; } 7で割り切れる場合はlucky、割り切れない場合はunluckyを出力。 〜了〜</iostream>
paiza.jp #include <iostream> using namespace std; void Solve(int n) { cout << (n%7? "unlucky" : "lucky") << endl; } int main(void) { int n; cin >> n; Solve(n); return 0; } 7で割り切れる場合はlucky、割り切れない場合はunluckyを出力。 〜了〜</iostream>